# Loading a .swf into flash from a .swf

**URL:** <https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302>\
**Category:** flash\
**Created:** [July 12, 2004, 5:58am UTC](https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302 "2004-07-12T05:58:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KnightsTouch](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@KnightsTouch](https://forum.kirupa.com/u/KnightsTouch)\
**Post date:** [July 12, 2004, 5:58am UTC](https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302/1 "2004-07-12T05:58:26Z")

</div>

To cut down on bandwidth i used the info here: [http://www.kirupa.com/developer/mx/loading.htm](http://www.kirupa.com/developer/mx/loading.htm) (awesome, using action script to load a movie handler), The problem is loading a .swf into flash from a .swf. Here is what I am trying to do:

I’ve got a main.swf and I load a external home.swf into it. In the external home.swf there is a button that I would like to load another swf in the main, using the loading technique’s above.

I found a way around it by adding a ‘on press goto frame 2’, and copying the second swf into the external home.swf at frame 2. As this site builds to completion, it can get rough copying already swf’s into swf’s.

If this help, you can view my creation at [www.geocities.com/tah\_timbo](http://www.geocities.com/tah_timbo). The home.swf loads into the main.swf. In the home.swf there are two buttons near the center of the page, below the box, that are ‘Buy Now’ and ‘Free Trial’. I would like to load another swf here from the home.swf (currently a copy to frame 2 of underconstruction.swf). I hope I explained this well enough for a resolution. Thanks to all who spend the time.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 12, 2004, 10:41am UTC](https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302/2 "2004-07-12T10:41:22Z")

</div>

In home.fla, where do you load main.swf? In an empty MC?  
In this example, the empty MC in home.fla is called container

```auto
button_1.onPress = function() {
    loadMovie("another.swf", "_root.container");

```

Let me know if that helps…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 12, 2004, 5:12pm UTC](https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302/3 "2004-07-12T17:12:01Z")

</div>

you did it! its running like a dream. Thank you, thank you, thank you

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 12, 2004, 6:01pm UTC](https://forum.kirupa.com/t/loading-a-swf-into-flash-from-a-swf/57302/4 "2004-07-12T18:01:28Z")

</div>

“\_root” always refers to the timeline of the main movie.  
If you have AS with “\_root” in, let’s say, another.swf, and you want it to  
do something in home.swf, it won’t work. Try “\_parent” instead.  
good luck…
