hey, I applaude the ambition, but I see little sense in doing this from scratch – have a look at http://code.google.com/p/scxml4flex/ first. I actually spent quite some time writing that code, and now it's been sitting there for a few months while I develop its sister project in Python at http://code.google.com/p/pyscxml/ instead. but I actually made it quite far on the actionscript implementation!
all the core functionality works, as well as the script tag, invoke (type="scxml" and invoking soap webservices). by no means do we have full coverage yet, but it's not too shabby, if I may say so myself. you'll find that I used it to write my thesis, located at http://code.google.com/p/pyscxml/downloads/detail?name=exjobb_johan_roxendal.pdf&can=2&q= in there you can read more about its capabilities. and check out the example at: http://scxml-example.appspot.com/static/menu/MenuExample.html where the library is used, in all its glory. / Johan Roxendal