Package | com.yworks.support |
Class | public class State |
Inheritance | State flash.events.EventDispatcher |
stateMachine
A state may be connected to other states via Transitions
.
Creating a state is done via the StateMachine.createState
method.
Property | Defined By | ||
---|---|---|---|
enabled : Boolean
Enables or disables this transition. | State | ||
tag : Object
Gets or sets a custom tag that is associated with this state. | State |
Method | Defined By | ||
---|---|---|---|
State(owner:StateMachine, stateEnteredHandler:Function = null)
Creates a new instance. | State | ||
toString():String [override]
A String representation of this. | State |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched once the machine enters this state. | State | |||
Dispatched once the machine exits this state. | State |
enabled | property |
enabled:Boolean
Enables or disables this transition.
A state machine will not automatically enter a state that is disabled.
public function get enabled():Boolean
public function set enabled(value:Boolean):void
tag | property |
tag:Object
Gets or sets a custom tag that is associated with this state.
public function get tag():Object
public function set tag(value:Object):void
State | () | Constructor |
public function State(owner:StateMachine, stateEnteredHandler:Function = null)
Creates a new instance.
Parametersowner:StateMachine — The StateMachine that owns this instance.
| |
stateEnteredHandler:Function (default = null ) — An event handler for StateChangeEvent.STATE_ENTERED .
|
toString | () | method |
override public function toString():String
A String representation of this.
ReturnsString |
stateEntered | Event |
com.yworks.support.StateChangeEvent
com.yworks.support.StateChangeEvent.STATE_ENTERED
Dispatched once the machine enters this state.
stateExited | Event |
com.yworks.support.StateChangeEvent
com.yworks.support.StateChangeEvent.STATE_EXITED
Dispatched once the machine exits this state.