Pausing a Flash movie with actionscript 2
Quite often you don’t want to drag your time line out say 60 seconds just to add a delay to your animation or event.
There are many different ways to delay you flash movie from playing but the one that i have included below is one of the most simplest. Using the timer below you can set your time line to pause/stop (or delay) for a set period of time.
function freezeTime(howLong:Number);void{
stop();
var t:Timer = new Timer(howLong, 1);
t.addEventListener(
TimerEvent.TIMER,
function(evt:TimerEvent);void{
play();
}
}
t.start('4000');
};
Tags: actionscript, flash
This entry was posted on Wednesday, February 25th, 2009 at 10:37 pm and is filed under ActionScript & Flash. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.