# Loading an external .swf then referencing to it's label

**URL:** https://forum.kirupa.com/t/loading-an-external-swf-then-referencing-to-its-label/269303
**Category:** flash
**Created:** [August 26, 2008, 2:56am UTC](https://forum.kirupa.com/t/loading-an-external-swf-then-referencing-to-its-label/269303 "2008-08-26T02:56:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Flashercise](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Flashercise](https://forum.kirupa.com/u/Flashercise)
#### Post date: [August 26, 2008, 2:56am UTC](https://forum.kirupa.com/t/loading-an-external-swf-then-referencing-to-its-label/269303/1 "2008-08-26T02:56:21Z")

</div>

I’m new with Actionscript and am currently working at building a website. I’ve got a lot figured out so far but one problem I’m running into is when I try to load an external .swf using the loader component and then reference it or try to point to it within my main .swf I can only load the “gallery.swf.” through myLoader.contentPath = “gallery.swf”;

I’m trying to load it and then point to a specific label so it loads that frame or label. I’ve created separate labels for each image in my gallery so that when I point to them with AS, it knows which image to load. It worked when I had the gallery in the main .swf but when I used the loader component it didn’t work.

The AS I used that worked before I made a separate .swf and used a loader was:

on(release) {  
\_parent.\_parent.\_parent.photos\_MC.gotoAndPlay(“img1”);  
}

what I thought would work was:

on(release){  
\_parent.\_parent.\_parent.myLoader.contentPath = gallery.swf.photos\_MC.gotoAndPlay(“img1”);  
}

I’m probably totally off, but if anyone could help out I would appreciate it!
