# Loading/unloading movie problem (MX)

**URL:** <https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955>\
**Category:** Uncategorized\
**Created:** [October 25, 2003, 11:13pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955 "2003-10-25T23:13:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![catseyes4U](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@catseyes4U](https://forum.kirupa.com/u/catseyes4U)\
**Post date:** [October 25, 2003, 11:13pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/1 "2003-10-25T23:13:24Z")

</div>

hello,  
i have a little problem (not so little for me) with laoding movies:  
on the main movie, i have a button which loads a movie with  
the following script:

horta.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“03\_horta.swf”, “container”);  
container.\_x = 0 ;  
container.\_y = 210 ;  
}

and another button which loads:

olot.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 2);  
loadMovie(“03\_montsacopa.swf”, “container”);  
container.\_x = 0 ;  
container.\_y = 210 ;  
}

it loads the first one perfectly, the second one too, but then, i  
can’t see the first one again…  
i guess the problem is about levels. i tried several thing but it’s not working…

can someone help please?

---

<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:** [October 25, 2003, 11:32pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/2 "2003-10-25T23:32:16Z")

</div>

```auto
this.createEmptyMovieClip("container", 1);
container._y = 210;
horta.onPress = function() {
container.loadMovie("03_horta.swf");
};
olot.onPress = function() {
container.loadMovie("03_montsacopa.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:** [October 25, 2003, 11:58pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/3 "2003-10-25T23:58:08Z")

</div>

thanks, i tried with the code you gave me (but instead of “this”, i had to put “\_root” otherwise it was not working at all…) but the problem is still the same: i can’t see again the first movie… any suggestion else, please?  
(i’m really very new at as…)

---

<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:** [October 26, 2003, 12:20am UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/4 "2003-10-26T00:20:47Z")

</div>

Uhmm… attach your FLA. :stunned:

---

<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:** [October 26, 2003, 1:24pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/5 "2003-10-26T13:24:16Z")

</div>

hi, here is the fla (with swf and font). the code is the one i manipulate from the kirupa tutorial. actually, when i did the tutorial, no problem, but i think it’s because i was working with only one scene; but my project have more then one…  
thank you in advance for helping

---

<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:** [October 26, 2003, 1:42pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/6 "2003-10-26T13:42:43Z")

</div>

Which buttons load your swfs ?

---

<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:** [October 26, 2003, 3:38pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/7 "2003-10-26T15:38:37Z")

</div>

if you go to “estudios” and choose one project, the button which loads movie is on the inferior right side (like a squarre), below the scolling text, called “ver imágenes”

---

<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:** [October 26, 2003, 4:06pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/8 "2003-10-26T16:06:08Z")

</div>

1. Delete all the keyframes in the “movieclip” layer.
2. Create a new movieclip (CTRL+F8), give it any name, press ok.
3. Open the library (F11), and drag the movieclip you just created to the stage in the “movieclip” layer. It should be present over the entire timeline.
4. With the movieclip selected, open the Info Panel (CTRL+I), and set the x and y positions to 0 and 210.
5. Give the movieclip the instance name “container”.
6. Use this for each button code:

```auto

button.onPress = function () {
	container.loadMovie("yourswf.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:** [October 26, 2003, 4:46pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/9 "2003-10-26T16:46:18Z")

</div>

if i assign the code you gave me to the button, i get synthax error message and if i set it to the “acciones load” layer, it loads the first movie i check but not the other two…

---

<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:** [October 26, 2003, 4:56pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/10 "2003-10-26T16:56:15Z")

</div>

Hmn, I must’ve forgotten to tell you something. Anyways, here’s my version: [http://www.voetsjoeba.com/stash/main-menu.fla](http://www.voetsjoeba.com/stash/main-menu.fla)

---

<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:** [October 26, 2003, 5:09pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/11 "2003-10-26T17:09:06Z")

</div>

i tried with the fla you linked and it’s still not working: i can load one movie, a second one, but not the thrid and i can’t watch the first one again…  
thank you for the help anyway and if you get inspired to do it in another way, i’ll be very thanksfull to know it…

---

<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:** [October 26, 2003, 5:35pm UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/12 "2003-10-26T17:35:41Z")

</div>

I see it now. You have a bad structure in your file. You don’t go to the frames where the onPress handler is set. After you’ve pressed a first button, you always go to olot2, pfc2, but on those frames the handlers aren’t defined.

I’ve fixed it, so download again from the previous link, I’ll update the file.

---

<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:** [October 27, 2003, 11:24am UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/13 "2003-10-27T11:24:00Z")

</div>

thank you SOOOOOO much! i works great!

---

<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:** [October 27, 2003, 11:40am UTC](https://forum.kirupa.com/t/loading-unloading-movie-problem-mx/33955/14 "2003-10-27T11:40:49Z")

</div>

No problem 🙂
