-
Load external SWF at a certain frame label?
I have a project with a main SWF that loads multiple external SWF's. This is currently working, however, I am looking to load some of these SWF's to a certain Frame Label. Is there anyway to do this?
My code looks like this currently:
My original loader is:
var Loader1:Loader = new Loader();
var Xpos:Number = 0;
var Ypos:Number = 0;
Loader1.contentLoaderInfo.addEventListener(Event.C OMPLETE, onSWFLoaded);
this.addChild(Loader1);
var url:URLRequest = new URLRequest("M-1_Intro.swf");
Loader1.load(url);
function onSWFLoaded(e:Event):void {
Loader1.contentLoaderInfo.removeEventListener(Even t.COMPLETE, onSWFLoaded);
}
This loads the first External SWF. Then a dispatch event from within each of those will unload the current SWF, and load a new one:
Loader1.addEventListener("MM2_Load", MM2_Load)
function MM2_Load(event:Event):void{
Loader(event.currentTarget).unloadAndStop(); //completely removes the swf from memory
Loader1.contentLoaderInfo.addEventListener(Event.C OMPLETE, onSWFLoaded);
this.addChild(Loader1);
var url:URLRequest = new URLRequest("M-2_WIB.swf");
Loader1.load(url);
trace("M-2_WIB.swf loaded");
}
This all works well, however what I would like to be able to do is have the secondary SWF's load to specific frame labels. So, for instance, I would like to have the "M-2_WIB.swf" load up, but go to a frame label called "instructions".
How can I do this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|