Here is the code I am using:
import flash.utils.Timer;
import flash.events.TimerEvent;
//Pausing the timeline
function wait(){
stop();
var timer:Timer=new Timer(2000,1);
timer.addEventListener(TimerEvent.TIMER,waitdone);
timer.start();
}
function waitdone(e:TimerEvent){
e.currentTarget.removeEventListener(TimerEvent.TIMER,waitdone);
play();
}
When I call the following function, it pauses for 2 seconds, easy. What I can’t figure out to do is call wait(); and add another second onto it to get 3 seconds rather than two.
Is there an easy way of doing this?
You mean like this?
Then you call it using wait(2) or wait(3) depending on how many seconds you want.