Friday, August 17, 2007
Friday, August 17, 2007    

I've spent some time the past two weeks developing something that I haven't seen or heard about before: a flash component that pulls the guts of its code from a remote SWF. Now, why would someone want to do this?


Traditionally when you create a component & generate your resulting .mxp installer file, you distribute it or make it available. Then when you need to update the component, you generally make another version of the component and use that. This works, but its not very elegant. A component that when compiled into a SWF and runs online using code pulled into the SWF itself gives you the ability to update the component without distributing a new component.

Bandwidth. Yes. That is a big concern... however you can count on caching the remote SWF when its loaded, and you can change the version number of the SWF to pull in to use the code from... passing in a flash vars variable in the object/embed, etc. There are a few ways this could work, but I think you get the idea here.

So with some Live Preview magic, and a few kinks that have been worked through, a system has been developed allowing for a component to live and breathe even after installed onto IDEs everywhere. Update a single SWF or make another version of it (containing all the major code), update flash vars if going that route, etc. The component could even check a small XML file to know which SWF to pull to use for its core code. To get around the flash vars thing. A hair more bandwidth. But it works and its pretty cool to see working.


0 Comments:

Post comment

Links to this post:


Create a Link

gotoAndStop( topOfPage );