HunterSkookum
October 30th, 2007, 12:19 PM
The setup:
parentClass.as/parentClass.fla <-- document root, has several Loaders which load external SWFs:
externalClass.as/externalClass.fla <-- one of the external documents
In externalClass several things reference the stage. In the *constructor* function I have added a trace which outputs "externalClass has been initialized." When I addChild the Loader.content, I trace "addChild: externalClass" ... when I run the parentClass, this is what gets traced:
1. "externalClass hass been initialized"
2. "Loader: Event.COMPLETE callback handler"
3. "addChild: externalClass"
This causes problems because the constructor of externalClass references the stage, which doesn't "exist" until the externalClass has been addChild'ed. Is there a way to load an external SWF in the background and "run" it later?
Thanks, I've been pounding my head on this for a while.
Hunter
parentClass.as/parentClass.fla <-- document root, has several Loaders which load external SWFs:
externalClass.as/externalClass.fla <-- one of the external documents
In externalClass several things reference the stage. In the *constructor* function I have added a trace which outputs "externalClass has been initialized." When I addChild the Loader.content, I trace "addChild: externalClass" ... when I run the parentClass, this is what gets traced:
1. "externalClass hass been initialized"
2. "Loader: Event.COMPLETE callback handler"
3. "addChild: externalClass"
This causes problems because the constructor of externalClass references the stage, which doesn't "exist" until the externalClass has been addChild'ed. Is there a way to load an external SWF in the background and "run" it later?
Thanks, I've been pounding my head on this for a while.
Hunter