FPSBeacon

Kind of class:class
Inherits from:none
Implements:
Version:1.0
Author:Francis Bourre
Classpath:com.bourre.transitions.FPSBeacon
File last modified:Wednesday, 31 October 2007, 07:35:30
FPSBeacon acts as a FPS synchronizer.

Dispatchs onEnterFrame event at each displayed frame by the player.

Class properties

onEnterFrameEVENT

static onEnterFrameEVENT:EventType = new EventType('onEnterFrame')
(read,write)
Broadcasts at each frame displayed by the player.

Class methods

getInstance

static function getInstance (
Returns FPSBeacon instance.

Always return the same instance.

Returns:
FPSBeacon instance

release

static function release (
) : Void
Destroy FPSBeacon instance.

Warning onEnterFrame event will never be
broadcasted.

Instance methods

addFrameListener

function addFrameListener (
oL:IFrameListener) : Void
Adds listener for receiving all FPSBeacon events.

Example

var b : FPSBeacon = FPSBeacon.getInstance();
b.addFrameListener( myListener );
Parameters:
oL:
Listener object which implements IFrameListener interface.

isPlaying

function isPlaying (
) : Boolean
Indicates if FPSBeacon's running.

Example

var b:Boolean = FPSBeacon.getInstance().isPlaying();</em>
Returns:
true if FPSBeacon is running, either false

removeFrameListener

function removeFrameListener (
oL:IFrameListener) : Void
Removes passed-in listener for receiving all FPSBeacon events.

Example

var b : FPSBeacon = FPSBeacon.getInstance();
b.removeFrameListener( myListener );
Parameters:
oL:
Listener object which implements IFrameListener interface.

start

function start (
) : Void
Starts the process.

Example

FPSBeacon.getInstance().start();
Specified by:

stop

function stop (
) : Void
Stops the process.

Example

FPSBeacon.getInstance().stop();
Specified by:

toString

function toString (
) : String
Returns the string representation of this instance.
Returns:
the string representation of this instance