hi there!! is there such a thing as countdown timer in flash 8? like from 30 secs all the way to 0.
if there is.. could anyone pleaseee teach mi how to do one?
thanks thanks
![]() | It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!) |

|
|
|
|
Moderator: Phate
//////////////////////////////////////////
// Code Provided By Gabor Szauer //
// http://szauer.net //
/////////////////////////////////////////
time = 150; // The time you want to count down (In seconds)
fps = 12; // The FPS of your movie (12 by default)
time_left = time*fps;
function countdown() {
time_left--;
minutesLeft = Math.floor(((time_left/12)/60));
secondsLeft = Math.floor(((time_left/12)%60));
if (secondsLeft<10) {
secondsLeft = "0"+secondsLeft;
}
if (minutesLeft<10) {
minutesLeft = "0"+minutesLeft;
}
_root.currentTime = minutesLeft+":"+secondsLeft;
trace(currentTime);
}
_root.onEnterFrame = function() {
countdown();
};Users browsing this forum: No registered users and 0 guests