ABloch
|
|
« on: June 07, 2012, 03:11:06 » |
|
Hi, I'm trying to set up a Finite State Machine in my multicore app, but it seems a bit tricky for me. So far, here is what I have done (code from example) : in my ApplicationFacade.as :
registerCommand( ApplicationConstants.STARTUP, StartupCommand ); registerCommand( ApplicationConstants.STARTED, PreloaderCommand ); registerCommand( ApplicationConstants.PLUMBING, PlumbCommand ); registerCommand( ApplicationConstants.ASSEMBLE, AssembleCommand ); registerCommand( ApplicationConstants.FAIL, FailCommand ); in InjectFSMCommand.as :
var fsm:XML = <fsm initial={ApplicationConstants.STARTUP}> <!-- STARTUP THE SHELL --> <state name={ApplicationConstants.STARTUP}>
<transition action={ApplicationConstants.STARTED} target={ApplicationConstants.PLUMBING}/>
<transition action={ApplicationConstants.STARTUP_FAILED} target={ApplicationConstants.FAILING}/> </state> But when I trace my events, I only get this :
[Starting debug session with FDB] ApplicationFacade.initializeController() ApplicationFacade.sendNotification( note/startup [object Stage] null ) ApplicationFacade.sendNotification( StateMachine/notes/action null null ) InjectFSMCommand ApplicationFacade.sendNotification( StateMachine/notes/changed [object State] note/startup ) I know I will sound quite noob with my question, but I don't get why the transition action and target from <state name={ApplicationConstants.STARTUP}> are not triggered? TIA, Cyrill
|