FSMViz for pureMVC StateMachine Utility
source code here:
So this is just the visualisation and the editing of the States and Actions. I still need to implement the saving out of state, and the export of the StateConstants.as
A few points and pointers:
If you do look at the code, please consider that it is a quick prototype, it will need to be optimised and architechtured (it doesn’t even have a FSM yet ;~/).
The visualisation is done using the Flare package
I am using the flex framework RSL, so the first time you visit, the app might take a fair time to initiate. However, from then on it will be cashed on your machine, so it will be much quicker.
I have used Joel Hook’s FSM diagram from his Piping the Machine tutorial as the initial diagram
You can add states with the form on the bottom left, the package is an optional field that allows grouping of states for a prettier layout using a dot as the delimiter (eg “io.out”, “io.in” or “display”). Then fill in the name and hit ENTER to submit.
Rolling over a state will highlight outgoing actions (red) and with ctrl down, all incoming actions (green).
Clicking on a state will switch to Edit mode, and bring up forms for editing the state and outgoing actions.
Rolling over the highlighted actions will popup their names
Clicking the top right x (or hitting ESC) will close the panels with out committing changes
Clicking the red X buttons will perminently delete the state/action (hitting DEL will delete the state)
Clicking the green tick (or hitting ENTER) will commit any changes
Clicking the strange-green-plus-arrow button (or hitting F1) will create a new Action. You can then give it a name and choose its target state.