This class is designed to work as much like the flash.utils.Timer class as possible. There is additional parameter, pass in a reference to a Juggler to handle updates.
Add sample source code like this:
var myTimer:StarlingTimer = new StarlingTimer(Starling.juggler, 25, 0); myTimer.addEventListener(StarlingTimerEvent.TIMER, onTimerUpdate); myTimer.addEventListener(StarlingTimerEvent.TIMER_COMPLETE, onTimerComplete); // To start myTimer.start(); // To stop; myTimer.stop(); // To reset myTimer.reset();
%gist(11381801)%
Feel free to edit this part of the page!