Asynch StateMachine Demo 2

Using the AsyncCommand util (pureMVC)
I wanted to see how the AsynchCommand would work with the synchronous nature of the StateMachine, and whether the AsynchMacroCommand would hold the thread until its completion. Unfortunately in this example it seems that it doesn’t: the DISPLAY state is entered before the asynchrous loading process ends. This is safe in this demo as the progress window is modal and inhibits interaction, but this could open windows of uncertainty.

State Diagram:
[kml_flashembed movie=”http://www.revisual.co.uk/uploads/2009/jan/asynchStateDemo2/state_diagram2.swf” height=”180″ width=”300″ /]

In this demo, there are only two states. The loading takes place when entering the DISPLAY state.

Demo App:
[kml_flashembed movie=”http://www.revisual.co.uk/uploads/2009/jan/asynchStateDemo2/asynchStateDemo2.swf” height=”300″ width=”470″ /]

Leave a Reply

Your email address will not be published. Required fields are marked *