# loadMovie in empty movie clip

**URL:** <https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450>\
**Category:** flash\
**Created:** [January 31, 2003, 11:22am UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450 "2003-01-31T11:22:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayb](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jayb](https://forum.kirupa.com/u/jayb)\
**Post date:** [January 31, 2003, 11:22am UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/1 "2003-01-31T11:22:28Z")

</div>

im currently working on a full flash site and in the main page of this site i use an empty movie clip called contents to call up the next page of the site (these pages are seperate swf files loaded into the clip), inside one of these swf files , i have another empty movie clip to open a subsection of that page into (i have named this one contents2) (e.g. of me doing this is having link on main page to a manufacturers section, loading a page with buttons ranging from a to z, then user selecting the letter and having the relevant page open just under the selection box with the list of mfrs beginning with what letter they are after.)

When i test the 2 swf’s together they link fine, but when i update my site with the pages the links dont work. At first i used the

on (release) {  
\_root.contents2.loadMovie(“nameofswf.swf”);  
}

command but this didnt do anything when posted to my site, so i also gave it a try with the \_parent rather than \_root as a wild shot, but also didnt work.

Can any body give me some help on this one pls.

Thanks guys & gals! :rambo:

---

<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:** [January 31, 2003, 2:55pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/2 "2003-01-31T14:55:53Z")

</div>

Hi jayb,

If I understand you correctly you have the following.

Main movie = \_root  
Several loaded movies into EmptyMC = contents  
A nested EmptyMC in one of your loaded movies loaded into EmptyMC = contents2

Need to know the name of the loaded swf that contains the EmptyMC = contents2. Lets call it MfgList.

Try this…

```auto

on (release) {
_root.MfgList.contents2.loadMovie("nameofswf.swf");
}

```

---

<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:** [January 31, 2003, 3:08pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/3 "2003-01-31T15:08:38Z")

</div>

Hi andrthad, Thanks for getting back to me.

Yes youv got the idea of how its working (or how it should be!!).

I changed the actions of the button to the below :

on (release) {  
\_root.manufacturers.contents2.loadMovie(“0-9.swf”);  
}

Manufacturers is the name of the swf with the empty movie clip , contents2 the movie clip name and 0-9.swf is the swf file name. Iv published it and tested on my page but still doesnt seem to load the movie.

U dont think it has anything to do with file names or names being too long or anything does it?

:q:

---

<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:** [January 31, 2003, 3:20pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/4 "2003-01-31T15:20:32Z")

</div>

Hi jayb,

Doublecheck to make sure you named the instance name of the EmptyMC in your manufacturers swf. Also could you confirm that this button is located in your manufacturers swf. You could simplify the code and say.

```auto

on (release) {
    this.contents2.loadMovie("Zero_Nine.swf");
}

```

Also it might not like the name “0-9.swf”. Try “Zero\_Nine.swf”. I know Flash doesn’t like variables that start with numbers.

---

<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:** [January 31, 2003, 3:47pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/5 "2003-01-31T15:47:43Z")

</div>

If you are loading movies you’ve posted online into another movie, you have to write out the full path of the movie, so instead of:

this.contents2.loadMovie(“0\_9.swf”);

write:

this.contents2.loadMovie(“[http://www.yoursite.com/../0\_9.swf](http://www.yoursite.com/../0_9.swf)”);

the first works locally as long as the movies are in the same folder, but once online, you need to supply the whole shebang.

(-:

---

<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:** [January 31, 2003, 3:48pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/6 "2003-01-31T15:48:09Z")

</div>

Hi andrthad,

I took your advice and simplified it, renamed the empty movie clip to contents, and also changed the file name to zero\_nine.swf , the action behind the button is now :

on (release) {  
this.contents.loadMovie(“zero\_nine.swf”);  
}

and this works fine!!!

Thanku very much for the help.:rambo:

---

<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:** [January 31, 2003, 3:53pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/7 "2003-01-31T15:53:53Z")

</div>

Hey jcs,

I haven’t really experienced that. As long as the swf you want to load is in the same folder, regardless of local machine or web server, it should work like such.

```auto

on (release) {
    this.contents2.loadMovie("Zero_Nine.swf");
}

```

---

<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:** [January 31, 2003, 3:58pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/8 "2003-01-31T15:58:42Z")

</div>

Hi jcs / andrthad,

if the additional swf was in a another folder from the directory your main swf was in rather than put the full address , would it work with just (if the folder was in the same root as the main swf)

on (release) {  
this.contents.loadMovie(“foldername/swfname.swf”);  
}

is it neccessary to put the whole destination ? (e.g. www.website.etc etc)

---

<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:** [January 31, 2003, 4:12pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/9 "2003-01-31T16:12:19Z")

</div>

hardcoding the path was how I learned it - I suppose the real benefit is just that there’s no room for confusion. If you were to move your main movie, say, to another folder, the browser could still access the loaded movies b/c the whole URL is indicated.

Of course the converse of that is true too! :beam:

---

<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:** [January 31, 2003, 4:12pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/10 "2003-01-31T16:12:33Z")

</div>

Hey guys,

foldername/swfname.swf has always worked for me. Maybe jcs knows of a particular reason why you have to use the full domain path.

---

<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:** [January 31, 2003, 4:14pm UTC](https://forum.kirupa.com/t/loadmovie-in-empty-movie-clip/12450/11 "2003-01-31T16:14:32Z")

</div>

Good call. Have a good day:P
