I was wondering if any one knows how to build a countdown timer.
I found a few tutorials about clocks and countdowns to a particular date etc. Though what I would like my website to preform things after a minute or two i.e. Suddenly play a tune or change the backdrop etc…
Would be most happy for any suggestions, links etc…
though a bit more infomation would help. This setInterval() does it go into a empty mc with onClipEvent(load) or on it’s own? How would I define the time would I use a (getTimer()/1000) for that?..
Year, thanks it’s cool “should you want to countdown to Christmas, or maybe your birthday or even the release of a new movie…” But I would like to learn how to create a counter that start when you start the movie and after a minute or two plays a frame or changes a simbol etc.
onClipEvent (load) {
//start the timer
var stTime = getTimer();
}
onClipEvent (enterFrame) {
//read the timer
var curTime = getTimer();
//get the elapsed time in seconds
var elapsedTime = (curTime-stTime)/1000;
//do something after 10 seconds
if (elapsedTime>10) {
//do your stuff
//(optional to start again:)
stTimer = getTimer();
}
}
lol scotty comes up with the goods once again
sorry i couldnt be more coherant but i was in a hurry wen posting… and may i say scottys method is much better