Modifying the definition of a movieclip

I’ve been trying to setup a reasonable system for artist and programmers to coexist for ui design and implementation using flash builder and the flash ide.

I’ve found artists have an easier time working in the flash ide for ui stuff. The programmer then binds to the content of the movieclip defined by the artist. Pretty standard stuff. The tricky part is when these things span multiple frames.

As far as I can tell and please correct me if this assumption is wrong flash removes and adds children every key frame based on what was exported from the ide. To put it more concretely:

  1. I have a text field on frame 1 that say “hello” and another key frame on frame 5
  2. in code I change the text field to say “goodbye” instead of “hello”
  3. goto and stop frame 5 the text field says “hello” again or if I play a full loop till I hit frame 1 again frame 1 will say “hello” as well.

This means that when I bind to multi frame content I basically need to rebind every frame. I would like to adjust the actual definition of the movieclip as it must be stored somewhere in order for flash to always revert themovieclip to this original definition.

The only way I can think of to do this is:

  1. to first understand how the definition of a movieclip is stored in a swf.
  2. then load a movieclip as an array of bytes and then modify the bytes of the movieclip during bind time and then convert to movieclip. Not even sure that will actually work…

I’m wondering if there is some undocumented info about the definition of a movieclip and how it’s stored.