| Package | pegas.transitions |
| Class | public class FrameTimer |
| Inheritance | FrameTimer SimpleAction CoreEventDispatcher CoreObject |
| Implements | ITimer |
new FrameTimer object with the specified delay and repeat state.
This timer use the frames by second of the animation.
The timer does not start automatically, you much call the start() method to start it.
| Property | Defined by | ||
|---|---|---|---|
![]() | channel : String
Indicates the channel of this dispatcher if this instance is global.
| CoreEventDispatcher | |
| currentCount : int [read-only]
The total number of times the timer has fired since it started at zero.
| FrameTimer | ||
| delay : Number
The delay, in milliseconds, between timer events.
| FrameTimer | ||
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
| repeatCount : int
The total number of times the timer is set to run.
| FrameTimer | ||
| running : Boolean [read-only]
(read-only) Indicates
true if the process is in progress. | FrameTimer | ||
| Property | Defined by | ||
|---|---|---|---|
| _count : int
The internal counter of the timer.
| FrameTimer | ||
| _delay : Number
The internal delay of the timer.
| FrameTimer | ||
| _lastTime : uint
The internal
| FrameTimer | ||
| _next : Number = 0
The next value.
| FrameTimer | ||
| _repeatCount : int
The internal repeat counter of the timer.
| FrameTimer | ||
| Method | Defined by | ||
|---|---|---|---|
|
FrameTimer(delay:Number = 0, repeatCount:int = 0, bGlobal:Boolean = false, sChannel:String = null)
Creates a new FrameTimer instance.
| FrameTimer | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
| CoreEventDispatcher | |
![]() |
clone():*
Returns a shallow copy of this object.
| SimpleAction | |
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
![]() |
notifyFinished():void
Notify an ActionEvent when the process is finished.
| SimpleAction | |
![]() |
notifyStarted():void
Notify an ActionEvent when the process is started.
| SimpleAction | |
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
| CoreEventDispatcher | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
|
reset():void
Stops the timer, if it is running, and sets the currentCount property back to 0, like the reset button of a stopwatch.
| FrameTimer | ||
|
run(... arguments):void
Run the timer.
| FrameTimer | ||
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global
EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
start():void
Starts the timer, if it is not already running.
| FrameTimer | ||
|
stop():void
Stops the timer.
| FrameTimer | ||
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreEventDispatcher | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| CoreEventDispatcher | |
| Method | Defined by | ||
|---|---|---|---|
|
enterFrame(e:Event):void
Invoked when the frame engine is in progress.
| FrameTimer | ||
![]() |
setRunning(b:Boolean):void
Changes the running property value.
| SimpleAction | |
| _count | property |
protected var _count:intThe internal counter of the timer.
| currentCount | property |
currentCount:int [read-only]The total number of times the timer has fired since it started at zero.
Implementation public function get currentCount():int
| _delay | property |
protected var _delay:NumberThe internal delay of the timer.
| delay | property |
delay:Number [read-write]The delay, in milliseconds, between timer events.
Implementation public function get delay():Number
public function set delay(value:Number):void
— Throws an exception if the delay specified is negative or not a finite number.
|
| _lastTime | property |
protected var _lastTime:uintThe internal
| _next | property |
protected var _next:Number = 0The next value.
| _repeatCount | property |
protected var _repeatCount:intThe internal repeat counter of the timer.
| repeatCount | property |
repeatCount:int [read-write]The total number of times the timer is set to run. If the repeat count is set to 0, the timer continues forever or until the stop() method is invoked or the program stops.
Implementation public function get repeatCount():int
public function set repeatCount(value:int):void
| running | property |
running:Boolean [read-only]
(read-only) Indicates true if the process is in progress.
public function get running():Boolean
| FrameTimer | () | constructor |
public function FrameTimer(delay:Number = 0, repeatCount:int = 0, bGlobal:Boolean = false, sChannel:String = null)Creates a new FrameTimer instance. The timer does not start automatically; you must call the start() method to start it.
Parametersdelay:Number (default = 0) — The delay between timer events, in milliseconds.
|
|
repeatCount:int (default = 0) — Specifies the number of repetitions. If zero, the timer repeats infinitely. If nonzero, the timer runs the specified number of times and then stops.
|
|
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
|
|
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
|
| enterFrame | () | method |
protected function enterFrame(e:Event):voidInvoked when the frame engine is in progress.
Parameterse:Event |
| reset | () | method |
public function reset():voidStops the timer, if it is running, and sets the currentCount property back to 0, like the reset button of a stopwatch.
| run | () | method |
public override function run(... arguments):voidRun the timer.
Parameters... arguments |
| start | () | method |
public function start():voidStarts the timer, if it is not already running.
| stop | () | method |
public function stop():voidStops the timer.