I'm programming an AS3 application which loads an external SWF file to a movie clip in my stage. I need to read a variable inside the embedded SWF. I think I can, probably, do this through the bgURL, but I can't figure out how.
How can I read a variable inside the embedded SWF?
var bgLoader:Loader = new Loader();
var bgURL:URLRequest = new URLRequest("file.swf");
bgLoader.load(bgURL);
addChild(bgLoader);
myVarat the top level of file.swf (think of it as global), you should be able to do something like:trace(MovieClip(bgLoader.content).myVar);after the swf has completely loaded