FPSBeacon

Kind of class:public class
Package:com.bourre.transitions
Inherits from:none
Implements:
Classpath:com.bourre.transitions.FPSBeacon
File last modified:Monday, 24 November 2008, 11:36:57

Summary


Constructor
Class methods
Instance methods
  • start : void
    • Starts this beacon if it wasn't already playing.
  • stop : void
    • Stops this beacon if it wasn't already stopped.
  • isPlaying : Boolean
    • Returns true if this beacon is currently running.
  • addTickListener (listener:TickListener) : void
    • Adds the passed-in listener as listener for
  • removeTickListener (listener:TickListener) : void
    • Removes the passed-in listener as listener
  • enterFrameHandler (e:Event = null) : void
    • Handles the ENTER_FRAME from the internal
  • toString : String
    • Returns the string representation of this object.

Constructor

FPSBeacon

public function FPSBeacon (
)

Creates a new FPSBeacon.

Class methods

getInstance

public static function getInstance (

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 TickListenerimplementation, which would register to a FPSBeacon instance.
Returns:
  • a global instance of the FPSBeacon class

release

public static function release (
) : void

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

Instance methods

addTickListener

public function addTickListener (
listener:TickListener) : void

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:
tick listener to be added

enterFrameHandler

public function enterFrameHandler (
e:Event = null) : void

Handles the ENTER_FRAME from the internal

Shape object, and dispatch the onTickevent to its listeners.
Parameters:
e:
event dispatched by the Shape object

isPlaying

public function isPlaying (
) : Boolean

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

removeTickListener

public function removeTickListener (
listener:TickListener) : void

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:
tick listener to be removed

start

public function start (
) : void

Starts this beacon if it wasn't already playing.
Specified by:

stop

public function stop (
) : void

Stops this beacon if it wasn't already stopped.
Specified by:

toString

public function toString (
) : String

Returns the string representation of this object.
Returns:
  • the string representation of this object.