# loadMovie Question

**URL:** <https://forum.kirupa.com/t/loadmovie-question/34967>\
**Category:** Uncategorized\
**Created:** [November 8, 2003, 4:46pm UTC](https://forum.kirupa.com/t/loadmovie-question/34967 "2003-11-08T16:46:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hds](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@hds](https://forum.kirupa.com/u/hds)\
**Post date:** [November 8, 2003, 4:46pm UTC](https://forum.kirupa.com/t/loadmovie-question/34967/1 "2003-11-08T16:46:21Z")

</div>

Hey.

I am working with Flash MX. I am creating a site with a Main.fla which contains buttons to load other SubPage.swf files. For example, I have a Page1 button with the following actionscript code.

on (release) {  
\_root.contents.loadMovie(“page1.swf”);  
}

It works fine.

Now when I work on the Page1.fla, I am trying to load other Movies in the same fashion. It works when I CMD+RETURN to generate the .swf file.

However when I CMD+RETURN the Main.fla file and load the Page1 file, the buttons won’t load the movies.

Is this a Target Path issue? How would I remedy this?

Thanks.

---

<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:** [November 8, 2003, 4:53pm UTC](https://forum.kirupa.com/t/loadmovie-question/34967/2 "2003-11-08T16:53:56Z")

</div>

Yeah, it surely is a targetting issue. Try using relative addressing. 🙂

[http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.htm](http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.htm)

---

<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:** [November 8, 2003, 5:16pm UTC](https://forum.kirupa.com/t/loadmovie-question/34967/3 "2003-11-08T17:16:46Z")

</div>

Thanks for the info, but I am still a little confused.

Here are the files I have:

Main.fla  
Page1.fla

Where do I place [COLOR=blue]\_global.myAppMain = this;[/COLOR] ?  
On Frame 1 of the main timeline of Main.fla or Frame 1 of the main timeline of Page1.fla?

And what code do I attach to my button on Page1.fla?

Would it be

on (release) {  
\_global.myAppMain.loadMovie(“mySubPage.swf”);  
}

Thanks.
