Hello, I’m still relatively new to AS3 and I’m having a bit of a hard time with loaders, and would appreciate some insight.
Basically, I have a.swf which creates a loader that loads b.swf. b.swf is a 1 frame movie. On it’s main timeline there is a movieclip with an instance name of ‘box’. Is there any way a.swf can read/change values of the ‘box’ movie clip in b.swf?
Here is the code I presently have in a.swf…
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.load(new URLRequest("b.swf"));
addChild(loader);
function completeHandler(event:Event):void {
trace(event.target.content.box.width)
}
I get the following error when I compile…
ReferenceError: Error #1069: Property box not found on flash.display.AVM1Movie and there is no default value.
at b_fla::MainTimeline/completeHandler()
I’m really not sure what I can do, and would greatly appreciate any help. Thanks!!!