I have a question about accessing functions or variables on the main timeline from a loaded swf.
I know that there are a few ways to do this
-
Casting the timeline as a movie clip
Loader SWF Script
var testText:String = “Test”;
var myLoader:Loader = new Loader();
loadData(“loaded.swf”);function LoadData(aURL){
myLoader.load(new URLRequest(aURL));
addChild(myLoader);
} -
Cast the timeline as a generic object
var parentObj:Object = this.parent as Object;
parentObj.unloadSWF(“loaded.swf”)
My question is why do you need to do this. Why can you not just reference the main timeline of the container swf directly. If anyone could point me in the direction of some reading material on the question or has an answer.
Thanks in advance for any help