[swfmill] sprite introspection
g99k at hotmail.com
Thu Mar 8 15:48:31 EST 2007
Hi everyone. I am looking for a minimal sprite "introspection", to determine
the symbol name of statically placed movieclips.
I'd like to use this to load a symbol from the library onto the stage,
quickly run through its child movieclips and load them onto other movieclips
on the stage, effectively spreading the original structure to multiple
levels. I would then immediately delete the original, before it's shown in
the next frame.
The symbol name info is already available at design time, so I'd like to
somehow make it automatically accessible to ActionScript with swfmill.
However, most variable definitions don't work until the first frame of the
clip is played.
Which is the best way to store the symbol name so it can be read
immediately? It should work like this:
parentMc = originalLevel.attachMovie( "ParentSymbol", ... );
for( m : MovieClip in parentMc )
otherLevels[i++].attachMovie( m.symbolName, ... );
So far, I've only come across the "__proto__" variable:
__proto__.symbolName = "someName";
In swfml it would look like this:
At least, this seems to work. Is there a better way? Did I miss some
I could probably also register the sprite with a class, but that would
create a multitude of identical and otherwise pointless classes. And since
ActionScript afaik doesn't provide class introspection either, I'd still
have to add the sprite/class name as a variable.
Any input on this would be appreciated.
FREE pop-up blocking with the new MSN Toolbar - get it now!
More information about the swfmill