Packageorg.puremvc.as3.utilities.statemachine
Classpublic class State

Defines a State.



Public Properties
 PropertyDefined by
  changed : String
State
  entering : String
State
  exiting : String
State
  name : String
State
Protected Properties
 PropertyDefined by
  transitions : Object
Transition map of actions to target states
State
Public Methods
 MethodDefined by
  
State(name:String, entering:String = null, exiting:String = null, changed:String = null)
Constructor.
State
  
defineTrans(action:String, target:String):void
Define a transition.
State
  
getTarget(action:String):String
Get the target state name for a given action.
State
  
removeTrans(action:String):void
Remove a previously defined transition.
State
Property detail
changedproperty
public var changed:String
enteringproperty 
public var entering:String
exitingproperty 
public var exiting:String
nameproperty 
public var name:String
transitionsproperty 
protected var transitions:Object

Transition map of actions to target states

Constructor detail
State()constructor
public function State(name:String, entering:String = null, exiting:String = null, changed:String = null)

Constructor.

Parameters
name:String — the id of the state
 
entering:String (default = null) — an optional notification name to be sent when entering this state
 
exiting:String (default = null) — an optional notification name to be sent when exiting this state
 
changed:String (default = null) — an optional notification name to be sent when fully transitioned to this state
Method detail
defineTrans()method
public function defineTrans(action:String, target:String):void

Define a transition.

Parameters
action:String — the name of the StateMachine.ACTION Notification type.
 
target:String — the name of the target state to transition to.
getTarget()method 
public function getTarget(action:String):String

Get the target state name for a given action.

Parameters
action:String

Returns
String
removeTrans()method 
public function removeTrans(action:String):void

Remove a previously defined transition.

Parameters
action:String