/ Published in: ActionScript 3

Flash's Timer Class requires two parameters. The first is the delay (in milliseconds), the second is the amount of times you want the delay to fire.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var timer:Timer = new Timer(1000, 2); timer.addEventListener(TimerEvent.TIMER, blah); timer.start(); function blah(e:TimerEvent):void{ trace("Times Fired: " + e.currentTarget.currentCount); trace("Time Delayed: " + e.currentTarget.delay); }
Comments
