Posts in Category "adobemax2006"

My 10:30 Wednesday MAX preso…

So, my first attempt at live coding failed. It turned out it wasn’t the code – it was a silly thing I forgot to do in FlexBuilder in the heat of the moment! I wanted to show how trivial it was to write a dynamically loadable module that used bidirectional communication between the loader and loadee, so I prepared a WidgetShell (like a dumb portal) that would read an XML file containing a list of Widget SWFs to load.

Basically, FB doesn’t present a way for you to create a new ActionScript project where the main class extends a particular base class or implements an interface. You have to hand-add that. However, if you add a class, you get prompted and it will codegen the interface methods for you. Very handy when you’re on stage and can’t remember all the methods you need to implement for that module project.

So the trick I discovered was that you can delete the autogenerated class, and add it back at your leisure. For my preso, I left the (empty) project stub in place (which mostly just contained overrides of the src and bin directories) and planned to add the live-coded widget implementation.

I totally forgot that you then need to mark that new class as the executable application for the project! D’oh! It never even compiled my widget!

Oh well. Perhaps my 4:30 Thursday preso will be a bit more coherent and less coffee-addled. 🙂

Stay tuned, I’ll be posting my demo code as a zip in the next day or so. The copy of the preso in the library doesn’t have the best notes in it, so I’ll post that as well.