This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MacroCommandSignal extends Signal | |
{ | |
[Inject] | |
public var signalCommandMap:ISignalCommandMap; | |
public function MacroCommandSignal() | |
{ | |
// allows a payload Object to be injected into each command | |
super( Object ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IFSMProperties | |
{ | |
function get referringAction():String; | |
function get currentStateName():String; | |
function get transitionPhase():String; | |
function get isTransitioning():Boolean; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.osflash.statemachine.core.IFSMController; | |
public class FSMProperties implements IFSMProperties | |
{ | |
private var _fsmController:IFSMController; | |
[Inject] | |
public function set fsmController( value:IFSMController ):void | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseMacroAction implements IActionable | |
{ | |
private var _fsmController:IFSMController; | |
[Inject] | |
public function set fsmController( value:IFSMController ):void | |
{ | |
_fsmController = value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IActionable | |
{ | |
function action( payload:Object = null ):void | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LockDoor extends BaseMacroAction | |
{ | |
override protected function initiateMacroAction( payload:Object ):void | |
{ | |
sendAction( ActionNames.CLOSE); | |
sendAction( ActionNames.LOCK, payload ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
injector.mapClass( IFSMProperties, FSMProperties ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Inject(name="lockDoor")] | |
public var lockDoor:IActionable; | |
public function onClick( event:MouseEvent ):void{ | |
lockDoor.action() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////// | |
// exiting guard | |
if( !lock.isKeyValid( user ) ){ | |
fsm.cancel( Reasons.KEY_INVALID ); | |
} | |
//////////////////////////////////////////// | |
//////////////////////////////////////////// | |
// cancelled | |
if( reason == Reasons.KEY_INVALID ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flex-config xmlns="http://www.adobe.com/2006/flex-config"> | |
<target-player>9.0.124</target-player> | |
<compiler> | |
<debug>true</debug> | |
<source-path> | |
<path-element>src</path-element> | |
</source-path> | |
<library-path append="true"> | |
</library-path> | |
<external-library-path> |
OlderNewer