How to delay an event?
Hi everybody. I want to delay an event some minutes or seconds in order not to interfere with another event. How can I dow it? Thanks in advance.
Regards
Hi everybody. I want to delay an event some minutes or seconds in order not to interfere with another event. How can I dow it? Thanks in advance.
Regards
Thanks for all your patience. Well I have a movieClip that appears throw code (addChild....) and as this hapens I have a sound taken from the library. The other thing that hapens next is another Clip with another sound. That's why I want to display first one and then the other in order not to mix both sounds.
then you're NOT trying to delay an event being dispatched.
you can just use the timer to delay the call to a function that does something with '..another Clip with another sound'.
var t:Timer=new Timer(5000,1);
t.addEventListener(TimerEvent.TIMER,f2);
function f1():void{
addChild(mc1);
t.start();
}
function f2(e:TimerEvent):void{
addChild(mc2);
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.