Flash help - please!
- Started
- Last post
- 5 Responses
- armed_rob
I'm doing this game were I need sort of a countdown from 60 sek to 0 sek. And when the countdown hits 0 sek I need it to:
_root.gotoAndPlay("endofgame");
I can't figure how to do the "countdown movieclip"
HELP ANYBODY?
- shant0
Look into the setTimer function in Flash Help.
- armed_rob0
thanx - but I cant find the setTimer... the closest I get is setTime (but thats som'thing about date, right?)
By the way im running Flash MX (not 2004)...
- zack270
you can use setInterval, which executes at a specified number of millisecond intervals:
i=0;
countID = setInterval(function(){
i++;
if(i==60){
_root.gotoAndPlay("end");
clearInterval(countID);
}
},1000); // 1000ms=1sec
- shant0
Sorry I meant "getTimer"
- armed_rob0
Thanx Zack!
It works perfect.. BUT next problem:
I can't put a stop at the first frame because of the game (the game uses 7 frames, and "endofthegame" is in scene 2).
If there's not a "stop" in the first frame it jumps to "endofgame" right away!