[CS3] Timer help required!
Hi all,
I've made a countdown timer for my game, once it reaches zero it goes to the next frame, thats all fine but my problem is this:
if you complete the level before the time is up, how can i stop the timer and display the remaining time in the following frame. Also it would be nice if i could take the remaining time, multiply it by 10 and display that as a final score.
This is the code i have for the time so you can see my method.
Code:
timer=120;
countdown=function(){
timer--;
if (timer==0){
clearInterval(doCountdown);
_parent.nextFrame();
}
}
doCountdown=setInterval(countdown,1000);
Thanks for any help
Adam