flash as2 question
flash as2 question
Out of context: Reply #1
- Started
- Last post
- 5 Responses
- fyoucher10
You need to clear the timeout first, otherwise you'll have multiple timeouts triggering...
var delay_to:Number;
function pause(num:Number):Void {
clearTimeout(delay_to);
delay_to = setTimeout( function():Void { nextFrame(); }, num * 1000);
}Then when you want to call it, call >>>
pause(4);- ... you may need to add the stop() to that functionfyoucher1