Packagewki.automaton
Interfacepublic interface WKI_Automaton extends IEventDispatcher



Public Methods
 MethodDefined By
  
doAction(p_action:String):void
Switches the state machine into a new state.
WKI_Automaton
  
reset():void
Resets the automaton.
WKI_Automaton
Method Detail
doAction()method
public function doAction(p_action:String):void

Switches the state machine into a new state. If there is an transition from the current state to the new state labeled with the string passed via p_action, that transition is used to determine the new state. Otherwise, if a transition labeled with the string DEFAULT exists for the current state, that transition is used to determine the new state.

Parameters

p_action:String — The (user) action that determines the transition to be used.

reset()method 
public function reset():void

Resets the automaton. That is to say, the current state is set to the initial state, an an event of type WK_StateMachine.INIT is dispatched. As parameters, INIT (as action), the current state and an empty string (for the previous state) are stored in that event.