# Loading a swf to a frame label

**URL:** <https://forum.kirupa.com/t/loading-a-swf-to-a-frame-label/235551>\
**Category:** flash\
**Created:** [August 12, 2007, 6:15pm UTC](https://forum.kirupa.com/t/loading-a-swf-to-a-frame-label/235551 "2007-08-12T18:15:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lonerhino](https://avatars.discourse-cdn.com/v4/letter/l/45deac/32.png) [@lonerhino](https://forum.kirupa.com/u/lonerhino)\
**Post date:** [August 12, 2007, 6:15pm UTC](https://forum.kirupa.com/t/loading-a-swf-to-a-frame-label/235551/1 "2007-08-12T18:15:35Z")

</div>

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?

[AS]btnHome.addEventListener(MouseEvent.CLICK, loadHome);

function loadHome(evtObj:MouseEvent):void{

```
pageLoader.load(new URLRequest("main.swf"));
pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,findFrame);

```

}  
[/AS]  
and the error:

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

Any help is appreciated - Thanks
