Access keys

StateManager

Kind of class: class
Inherits from: Dispatcher
Classpath: management.StateManager
File last modified: Monday, 23 January 2006, 23:21:32
Events broadcast to listeners:
StateManagerEvent with type: UNLOAD_START
StateManagerEvent with type: LOAD_START

Summary

Class methods

Instance properties

state

state:String
(read)
The current state.

Class methods

getInstance

static function getInstance (
Returns reference to singleton instance of StateManager.

Instance methods

setState

function setState (
inStateName:String) : Void
Sets the new state. Calls unLoadState if the current state is not unloaded yet; otherwise calls loadState.
Parameters:
inStateName:
the new state identifier
Example:
This example sets the state to 'home':
StateManager.getInstance().setState(AppSettings.HOME_NAME);

toString

function toString (
) : String

unloadDone

function unloadDone (
) : Void
To be called when unloading a movie has been successful. Continues to the next state, unless state change is already taking place.
Example:
if (movieManager.removeMovie(inMovieName)) {
    StateManager.getInstance().unloadDone();
}