phinnycupcakes
12-15-2008, 07:35 PM
I want to make a countdown that does not use getTimer.
It's basically for a racing game. theres a few frames where it says Get Ready, then it has the frame where a timer counts down from 5 to 0, then it goes to the next few frames that say GO!. Thing is,I want this to repeat.and GetTimer uses the time passed since the moviestarted.
This is what I have for the countdown part.
var theend = 6;
onEnterFrame = function(){
if(thetime.text != 0 )
thetime.text = theend - Math.ceil(getTimer()/1000);
else
gotoAndPlay(10);
}
and I also have another layer in that frame that resets the text to 6.
SO! If there is a reset timer method or something to help me out, let me know =D
It's basically for a racing game. theres a few frames where it says Get Ready, then it has the frame where a timer counts down from 5 to 0, then it goes to the next few frames that say GO!. Thing is,I want this to repeat.and GetTimer uses the time passed since the moviestarted.
This is what I have for the countdown part.
var theend = 6;
onEnterFrame = function(){
if(thetime.text != 0 )
thetime.text = theend - Math.ceil(getTimer()/1000);
else
gotoAndPlay(10);
}
and I also have another layer in that frame that resets the text to 6.
SO! If there is a reset timer method or something to help me out, let me know =D