/ Published in: ActionScript 3
Expand |
Embed | Plain Text
var delayTimer:Timer; function wait(timeToHold:Number) { stop(); delayTimer = new Timer(timeToHold,0); delayTimer.addEventListener(TimerEvent.TIMER, continuePlayahead); delayTimer.start(); } function continuePlayahead(e:Event):void { play(); delayTimer.stop(); delayTimer.reset(); delayTimer.removeEventListener(TimerEvent.TIMER, continuePlayahead); }
You need to login to post a comment.
