| 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:BooleanEnables 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:ObjectGets 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():StringA String representation of this.
ReturnsString |
| stateEntered | Event |
com.yworks.support.StateChangeEventcom.yworks.support.StateChangeEvent.STATE_ENTEREDDispatched once the machine enters this state.
| stateExited | Event |
com.yworks.support.StateChangeEventcom.yworks.support.StateChangeEvent.STATE_EXITEDDispatched once the machine exits this state.