PDA

View Full Version : Loading a swf to a frame label



lonerhino
August 12th, 2007, 02:15 PM
How do you load a swf to a particular frame? In AS2, I would create a variable to act as a switch and the swf that is being loaded would check the condition of the switch.

I’d think that now I could use Event.COMPLETE to seek to the frame label in the swf i want to load. Is it a scope issue or a target issue?

btnHome.addEventListener(MouseEvent.CLICK, loadHome);

function loadHome(evtObj:MouseEvent):void{

pageLoader.load(new URLRequest("main.swf"));
pageLoader.contentLoaderInfo.addEventListener(Even t.COMPLETE,findFrame);
}

and the error:

ArgumentError: Error #2109: Frame label finish not found in scene Scene 1.

Any help is appreciated - Thanks