Some sample code for creating a simple state machine for your as3 apps.
The idea of a SM comes into play when you have even a slightly complex application, in which there are sequences of screens, game pause and play, pop-ups, leveling events and so on. Managing how the app responds and keeping track of where it is at can get messy in a hurry. Using the Model-View-Controller patterns, you can manage this complexity, maybe saving a few hours of debugging (or days).
This simple state matching code snip shows how you can change game states using a ‘jump table’ effectively a simple object array that leverages the .call() method of function, allowing us to call a function from a string of its name.
Read More »
Opera upgrade as of Sept 2009 for Wii has provided a few new toys for us: