Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Created February 25, 2011 11:10
Show Gist options
  • Save neilmanuell/843661 to your computer and use it in GitHub Desktop.
Save neilmanuell/843661 to your computer and use it in GitHub Desktop.
Base class for sending multiple synchronous actions
public class BaseMacroAction implements IActionable
{
private var _fsmController:IFSMController;
[Inject]
public function set fsmController( value:IFSMController ):void
{
_fsmController = value;
}
public function action( payload:Object = null ):void
{
initiateMacroAction( payload )
}
protected function initiateMacroAction( payload:Object ):void
{
}
protected final function sendAction( name:String, payload:Object = null ):void
{
_fsmController.action( name, payload );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment