[osflash] Assimilating Loaded SWFs with a Class
mail at tonio.com
Sun Aug 27 23:05:45 EDT 2006
Sorry if this question is beneath this list. I'm posting it here because
I figure most of you are familiar with this development style.
Basically I'm wondering how I can attach a class to a loaded SWF so that
I don't have to explicitly reference the container clip every time I
want to manipulate the loaded SWF's assets.
I'd like to me able to do something similar to Aral's root assimilation
target.__proto__ = this.__proto__;
target.__constructor__ = Application;
this = target;
Specifically I'm working with the V2 components from a loaded SWF's
library. I know there a couple of other recommended ways to get them
compiled into the base SWF but I like to keep them separate.
So I start out with my Main class which is now _root (thanks to Aral).
Next I have a class that makes a MovieClip and loads the component
library SWF into it. This class is itself a MovieClip attached to
Main/_root using this recommended convention:
static var symbolName:String = "__Packages.ComponentLoader";
static var symbolOwner:Function = ComponentLoader;
static var symbolLinked=
My problem starts after that, I don't know the correct method of
attaching the ComponentHandler class to the newly loaded movie.
Clear as mud? I posted the tiny abridged code here if anyone would be
good enough to take a look.
More information about the osflash