Packagepegas.transitions
Classpublic class FrameTimer
InheritanceFrameTimer Inheritance SimpleAction Inheritance CoreEventDispatcher Inheritance CoreObject
ImplementsITimer

Constructs a 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.



Public Properties
 PropertyDefined by
 Inheritedchannel : 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
 InheritedisGlobal : 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
Protected Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
FrameTimer(delay:Number = 0, repeatCount:int = 0, bGlobal:Boolean = false, sChannel:String = null)
Creates a new FrameTimer instance.
FrameTimer
 Inherited
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
 Inherited
clone():*
Returns a shallow copy of this object.
SimpleAction
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
Notify an ActionEvent when the process is finished.
SimpleAction
 Inherited
Notify an ActionEvent when the process is started.
SimpleAction
 Inherited
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
 Inherited
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
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
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
 Inherited
setLogger(log:ILogger = null):void
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
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
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
Protected Methods
 MethodDefined by
  
enterFrame(e:Event):void
Invoked when the frame engine is in progress.
FrameTimer
 Inherited
setRunning(b:Boolean):void
Changes the running property value.
SimpleAction
Events
 EventSummaryDefined by
 Inherited Dispatched when a process is finished.SimpleAction
 Inherited Dispatched when a process is started.SimpleAction
Property detail
_countproperty
protected var _count:int

The internal counter of the timer.

currentCountproperty 
currentCount:int  [read-only]

The total number of times the timer has fired since it started at zero.

Implementation
    public function get currentCount():int
_delayproperty 
protected var _delay:Number

The internal delay of the timer.

delayproperty 
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
— Throws an exception if the delay specified is negative or not a finite number.
_lastTimeproperty 
protected var _lastTime:uint

The internal

_nextproperty 
protected var _next:Number = 0

The next value.

_repeatCountproperty 
protected var _repeatCount:int

The internal repeat counter of the timer.

repeatCountproperty 
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
runningproperty 
running:Boolean  [read-only]

(read-only) Indicates true if the process is in progress.

Implementation
    public function get running():Boolean
Constructor detail
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.

Parameters
delay: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.
Method detail
enterFrame()method
protected function enterFrame(e:Event):void

Invoked when the frame engine is in progress.

Parameters
e:Event
reset()method 
public function reset():void

Stops 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):void

Run the timer.

Parameters
... arguments
start()method 
public function start():void

Starts the timer, if it is not already running.

stop()method 
public function stop():void

Stops the timer.