         protected var _initialState:IState;
         protected var _currentState:IState;
         protected var _inEventLoop:Boolean;
+        protected var _destroyed:Boolean;
         protected var _that:IFsm;
 
         /**

            var guard:IGuard;
            var trueGuard:IGuard;//the guard allowing a state transition
            var submachine:IFsm;

            while (event = _events.shift())
            {

                {
                    // execute exitState action for the current state
                    executeAction(currentState.exitState, event);
                    if (_destroyed) return;

                    // execute transition action
                    executeAction(foundTransition.action, event);
                    if (_destroyed) return;

                    // complete transition
                    _currentState = foundTransition.to;

                    // execute enterState action for the new state
                    executeAction(currentState.enterState, event);
                    if (_destroyed) return;
                }
                else if (noTransitionException)
                {
