This class implements a countdown timer.
The class has one event, by default called "onElapsed" (but this can
be changed in the property inspector, or programmatically via evtElapsed
). The value is the number of
remaining iterations until shut down (-1 is infinite).
protected var _interval:int = 1000
protected var _loopCt:Number
protected var _numIterations:int = 0
active:Boolean
Set this value to start or stop the timing interval. If changed while the timer is active,
the timer resets and starts again.
Implementation public function get active():Boolean
public function set active(value:Boolean):void
public var evtElapsed:String = onElapsed
This property holds the string name of the event.
interval:int
Set this value to change the timing interval. If changed while the timer is active,
the timer resets and starts again.
Implementation public function get interval():int
public function set interval(value:int):void
protected var intTimer:Timer
numIterations:int
Set this value to change the number of times the timer repeats the interval. If changed
while the timer is active, the timer resets and starts again. If the value is 0, the timer repeats
the interval indefinitely.
Implementation public function get numIterations():int
public function set numIterations(value:int):void
protected var origHeight:Number
protected var origWidth:Number
protected var previewBox:MovieClip
protected var SimpleTimerPreviewClip:Class
public function SimpleTimer()
override protected function configUI():void
configUI
Get the display objects created in preparation of launch. Note that we get called before
our constructor, and before we are notified that we are on the stage!
public function destroy():void
Remove this component's associated listeners and memory.
override protected function draw():void
protected function elapsed(te:TimerEvent):void
Parameters
public function pause():void
public function reset():void
public function start():void
Event generated when interval elapses. Value supplied with the event (data
) is the number of
remaining iterations until shutdown (0 means loop infinitely).
Thu Dec 15 2011, 12:05 AM -05:00