At 2/9/03 06:24 AM, Royster wrote:
i have a request: how do i make a countdown timer, which is displayed in a dynamic text box. the timer should start off at 60 and get to 0. when it gets to 0, i want the movie to gotoandplay the next scene.
any ideas?
lol, what a coincadence, i have the exact same thing in a game i am making right now. this is how. make a movieclip. inside the movieclip, make two layers. extend both layers to the amount equal to your fps (i.e: 12 fps would have 12 frames). on the first layer, make a dynamic textbox, and make the variable name "totaltime". then, in layer 2, select a frame and put in these EXACT actions:
totaltime = starttime-plustime;
starttime = 60;
plustime++;
if (totaltime<=0) {
totaltime = 0;
if (plustime>60) {
plustime = 60;
}
}
then, make a keyframe on the last frame, and in that keyframe, put in these actions:
gotoAndPlay(1);
there u go, you'll find it works. it took me a while to figure it out on my own, but i did it. i swear i didnt look anyway, it all came from my mind :-)