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
- getInstance : FPSBeacon
- Provides an access to a global instance of the
- release : void
- Stops and the delete the current global instance
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
Provides an access to a global instance of the
that the FPSBeacon class is a singleton, it simplify
the usage of that beacon into concret
FPSBeacon class. That doesn't meanthat 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
FPSBeaconclass
release
public static function release (
) : void
Stops and the delete the current global instance
of the
of the
FPSBeacon class. Instance methods
addTickListener
Adds the passed-in
this
is the first listener added to this beacon, the beacon
will automatically start itself.
listener as listener forthis
TickBeacon. If the passed-in listeneris the first listener added to this beacon, the beacon
will automatically start itself.
Parameters:
listener:
tick listener to be added
Specified by:
enterFrameHandler
public function enterFrameHandler (
e:Event = null) : void
Handles the
ENTER_FRAME from the internalShape object, and dispatch the onTickevent to its listeners. Parameters:
e:
event dispatched by the Shape object
isPlaying
public function isPlaying (
) : Boolean
Returns
A FPSBeacon is considered as running when it receive events
from its internal
true if this beacon is currently running.A FPSBeacon is considered as running when it receive events
from its internal
Shape object. Returns:
-
trueif this beacon is currently running
Specified by:
removeTickListener
Removes the passed-in
for this
is the last listener registered to this beacon, the beacon
will automatically stop itself.
listener as listener for this
TickBeacon. If the passed-in listeneris the last listener registered to this beacon, the beacon
will automatically stop itself.
Parameters:
listener:
tick listener to be removed
Specified by:
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.