Packagecom.bourre.transitions
Classpublic class FPSBeacon
ImplementsTickBeacon

Player version: Flash Player 9.0
Language version: ActionScript 3.0

FPSBeacon provides tick to its listeners based on the native ENTER_FRAME event. A Shape object is instanciated internally to provide that callback. By the way, the minimum time step for this beacon is subject to the flash player restrictions (playing in a browser or in a stand-alone player for example).

The FPSBeacon provides an access to a global instance of the class, concret TickListener may use that instance by default when starting or stopping their animations.

See also

TickBeacon.html


Public Methods
 MethodDefined by
  
Creates a new FPSBeacon.
FPSBeacon
  
Adds the passed-in listener as listener for this TickBeacon.
FPSBeacon
  
enterFrameHandler(e:Event = null):void
Handles the ENTER_FRAME from the internal Shape object, and dispatch the onTick event to its listeners.
FPSBeacon
  
[static] Provides an access to a global instance of the FPSBeacon class.
FPSBeacon
  
isPlaying():Boolean
Returns true if this beacon is currently running.
FPSBeacon
  
release():void
[static] Stops and the delete the current global instance of the FPSBeacon class.
FPSBeacon
  
Removes the passed-in listener as listener for this TickBeacon.
FPSBeacon
  
start():void
Starts this beacon if it wasn't already playing.
FPSBeacon
  
stop():void
Stops this beacon if it wasn't already stopped.
FPSBeacon
  
toString():String
Returns the string representation of this object.
FPSBeacon
Constructor detail
FPSBeacon()constructor
public function FPSBeacon()

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates a new FPSBeacon.

Method detail
addTickListener()method
public function addTickListener(listener:TickListener):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in listener as listener for this TickBeacon. If the passed-in listener is the first listener added to this beacon, the beacon will automatically start itself.

Parameters
listener:TickListener — tick listener to be added
enterFrameHandler()method 
public function enterFrameHandler(e:Event = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Handles the ENTER_FRAME from the internal Shape object, and dispatch the onTick event to its listeners.

Parameters
e:Event (default = null) — event dispatched by the Shape object
getInstance()method 
public static function getInstance():FPSBeacon

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Provides an access to a global instance of the FPSBeacon class. That doesn't mean that the FPSBeacon class is a singleton, it simplify the usage of that beacon into concret TickListener implementation, which would register to a FPSBeacon instance.

Returns
FPSBeacon — a global instance of the FPSBeacon class
isPlaying()method 
public function isPlaying():Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if this beacon is currently running. A FPSBeacon is considered as running when it receive events from its internal Shape object.

Returns
Booleantrue if this beacon is currently running
release()method 
public static function release():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Stops and the delete the current global instance of the FPSBeacon class.

removeTickListener()method 
public function removeTickListener(listener:TickListener):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener as listener for this TickBeacon. If the passed-in listener is the last listener registered to this beacon, the beacon will automatically stop itself.

Parameters
listener:TickListener — tick listener to be removed
start()method 
public function start():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Starts this beacon if it wasn't already playing.

stop()method 
public function stop():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Stops this beacon if it wasn't already stopped.

toString()method 
public function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this object.

Returns
String — the string representation of this object.