Status Ex Machina

March 3rd, 2010

I'm giving an introductory talk at FlashBrighton about State Machines on March 9th at the Werks. You can also catch it streaming live at http://live.flashbrighton.org at round about 7.00pm GMT (ok, it might not start till quarter past, when the bods in the real world have turned up :).

ReferenceError: FLBridge is not defined

November 11th, 2009

Recently this happened to my Flash CS3 Professional:
On start up I get error messages that won't go away. They'll always say "At line 1 of file "FLBridge_init.jsfl": ReferenceError: FLBridge is not defined", and whenever I try to exit the pop-up message, another one takes its place.

I'd have to do some acrobatic mouse work to actually quit Flash. Note that this isn't a crash, Flash seems to be working perfectly, just with consistent and irritating alerts.

Re-installation didn't help, and I found only three reference on web (one in Chinese) with no answers, Adobe support was also no help.

However, in an inspired moment, I thought I'd change my user profile (using Vista Home). Yup, that worked. So, still no idea about cause, but at least I've got Flash Back.

Spread the (F)SM Love

November 8th, 2009

Just seen that Joel Hooks has ported the pureMVC StateMachine utility to RobotLegs. Take a look at GitHub here.

Tidy up those unsightly Notifications

November 5th, 2009

OMAR GONZALEZ has come up with a really cool way of tidying up those nasty (and so necessary) notification constants. So simple you should have thought of it first!

DominoLite

October 20th, 2009

OK, so after some discussion with Nils Millahn I have cut down the functionality for my first release of Domino.

Domino will build and inject the StateMachine and add these additional functionalities:

    1) the ability to define custom States in the XML markup
    2) two additional notifications:
  • cancelled called when a state transition is cancelled
  • teardown called when the state has changed successfully, but before the entered notification is send for the next state.
    • 3) the ability to declare a command in the XML to be executed at each stage of the state transition cycle.
      4) the ability to declare state specific notifications in the XML to be send at each stage of the state transition cycle.

    ---------------------------------------------------------------
    the XML:

    <state name={STATE_EDITING} classpath="my.custom.State"/>
    <transition action={ACTION_DISPLAY} target={STATE_DISPLAYING}>
       <entered note="editing/entered" cmd="my.commands.EnteredCmd"/>
       <entering.guard note="editing/enteringGuard" cmd="my.cmds.EnteringGuardCmd"/>
       <exiting.guard note="editing/exitingGuard" cmd="my.cmds.ExitingingGuardCmd"/>
       <cancelled note="editing/cancelled" cmd="my.cmds.CancelledCmd"/>
       <tear.down note="editing/tearDown" cmd="my.cmds.TearDownCmd"/>
    </state>

    ---------------------------------------------------------------
    So at the moment I've given it to a few people to have a look at it to give feedback, and when I'm happy will upload it to my google.code site.

    Oh and please feel free to leave your own suggestions :)

    Domino rides again

    October 2nd, 2009

    Strange how things come full circle.

    Last year I was trying to manage the flow of pureMVC commands in my applications. Two things came out of this, the StateMachine utility, and an idea that I christened Domino. Well, Domino went a bit strange on me, and eventually I let it fallow for a bit while I worked on the FSMVisualiser.

    I've been manically working on several projects this year, and as I was commenting a utility that had been evolving throughout this time, I realised that with a tweek here and there I could create a layer of abstraction over the StateMachine utility in a simple and (I hope) elegant way. It would fulfill the original purpose of Domino without getting really complicated in the process. Basically it extends the StateMachine markup XML so that it also defines the relationships between pureMVC actors within each state.

    This month I've been able to do a bit more work on the FSMVisualiser, and am incorporating my Domino utility into it as a proof of concept.
    Read the rest of this entry »

    catch up with anti

    September 18th, 2009

    Well, I've just got through a busy patch work-wise, with no time to work on any private projects, so I'm afraid the FSMVisualiser hasn't progressed at all since my last post a while back.

    However, I thought i'd post some stuff that I've been working on. One of these projects is a flickbook navigated trail commissioned by ANTI – Contemporary Art Festival in Finland. The work is by word picture studio (festival entry here). My part was to composite and make ready all the final prints using AfterEffects, Photoshop and InDesign.

    Below are some choice thumbnails, because I sort of like looking at the flickbooks this way:

    Flick the First
    Flick the First, Flickers, ANTI Festival 2009 by word picture studios

    Flick the Fifth
    Flick the Fifth, Flickers, ANTI Festival 2009 by word picture studios

    Flick the Sixth
    Flick the Sixth, Flickers, ANTI Festival 2009 by word picture studios

    Flick the Eighth
    Flick the Eighth, Flickers, ANTI Festival 2009 by word picture studios

    FSMViz Version 0.4

    July 22nd, 2009

    FSMViz for pureMVC StateMachine Utility

    FSMViz for pureMVC StateMachine Utility


    source code here:
    http://puremvc-utilities.googlecode.com/svn/tags/fsm_viz_0.4

    Added the decode to AS3.

    OK, so next I'm going to rip this all down and re-architecture it.

  • create a shell and a deployment agnostic module
  • split up the encoding/decoding and parsing of the data from the data editing
  • take all the manipulation of the visualisation from the view so that the view just fires notifications
  • make the visualisation into a module so that it can be changed easily
  • add preference data so that properties can be changed easily
  • oh, and implement an FSM :)
  • FSMViz Version 0.3

    July 12th, 2009

    FSMViz for pureMVC StateMachine Utility

    FSMViz for pureMVC StateMachine Utility


    source code here:
    http://puremvc-utilities.googlecode.com/svn/tags/fsm_viz_0.3

    OK, so I've added the ability to open from JSON or XML and also to decode to them. Originally, I was just going to save out to JSON as the main "file-type", and export to an AS3 file, but after Jason MacDonald suggested it would be good to export/import the xml, I thought why not, it only took an hour.

    The only things to note are that the XML looses all the meta data that the JSON preserves. And secondly, because of this, it can only import XML that uses the naming conversions outlined below.

    Naming convertions:

  • States will have all white spaces removed and have title case. Thus "Data aquisition" becomes "DataAquisiton"
  • Actions will have white spaces removed and have camel case. Thus "Acquisition failed" becomes "aquisitionFailed"
  • In addition to the above a prefix will be added to further define the name:
  • State names will have the prefix "state/". Thus "Data aquisition" becomes "state/DataAquisiton"
  • Action names will have the prefix "action/". Thus "Acquisition failed" becomes "action/aquisitionFailed"
  • Entering notification names will have the same name as their associated state, but with a prefix "entering/". Thus the entering notification name for the state "Data aquisition" will be "entering/DataAquisiton"
  • Exiting notification names will have the same name as their associated state, but with a prefix "exiting/". Thus the exiting notification name for the state "Data aquisition" will be "exiting/DataAquisiton"
  • Changed notification names will have the same name as their associated state, but with a prefix "changed/". Thus the entering notification name for the state "Data aquisition" will be "changed/DataAquisiton"
  • I think that these are pretty uncontentious with the exception of the choice of delimiter for the prefix. This I think will be changable by the user.

    All I have to do now is that all important conversion to an AS3 file, then I can rip the whole thing apart and rebuild it.

    So, any suggestions as to deployment? Air, online with php service?, Zinc? (Zinc? LOL only joking!)

    FSMViz Version 0.2

    July 3rd, 2009

    FSMVis for pureMVC StateMachine Utility

    FSMViz for pureMVC StateMachine Utility


    source code here:
    http://puremvc-utilities.googlecode.com/svn/tags/fsm_viz_0.2

    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.