Hello everyone. I am developing a small flash game for school. Here is a quick overview of what it is. There is a ball the is being pulled by gravity, wind, friction, and other forces. The objective is to use the arrow keys to keep the ball in the "window" for 30 seconds and then you can move on to the next level. I have used the below code for the timer. tm=30; displayTime.text = tm; countDown = function () { tm--; displayTime.text=tm; if (tm==0) { clearInterval(timer); } }; timer = setInterval(countDown, 1000); stop(); Code (markup): When I first run it, the timer counts down from 30 seconds then goes to the next level. This is fine. But when I click the "reset" button, and then start playing again, the timer counts down really fast. Way faster than it should. Here is the code for the reset button. on (release) { gotoAndPlay("Scene 1", 1); } Code (markup): Scene one is the main menu. Then you click play to to go to scene 2. Any help will be useful. If you need more information please let me know.
Do you work with flex or Flash and Action Script.I am learning flex can you help me. Thanks sharing this code.