# Help with loading external movie

**URL:** https://forum.kirupa.com/t/help-with-loading-external-movie/19627
**Category:** flash
**Created:** [April 30, 2003, 12:29am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627 "2003-04-30T00:29:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Mik3](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mik3](https://forum.kirupa.com/u/Mik3)
#### Post date: [April 30, 2003, 12:29am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/1 "2003-04-30T00:29:03Z")

</div>

I made my site, and all the external movies load when I press test movie, and when I open the swf, but when i put it online… It doesn’t work! GRRR! I have all the external movies in the same folder as the main movie. Here is the code I used:  
[AS]on (release) {  
\_root.empty.loadMovie(“home.swf”);  
}  
[/AS]

empty is the movie the external movies load in

---

<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: [April 30, 2003, 12:32am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/2 "2003-04-30T00:32:19Z")

</div>

```auto
on (release){ 
       loadMovie("home.swf", _root.empty);
}

```

try that…

---

<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: [April 30, 2003, 12:38am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/3 "2003-04-30T00:38:18Z")

</div>

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: [May 4, 2003, 8:18pm UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/4 "2003-05-04T20:18:24Z")

</div>

still not working! ☹

---

<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: [May 4, 2003, 8:31pm UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/5 "2003-05-04T20:31:56Z")

</div>

what are you using as a button a mc or a btn?? try using it like this

\_root.buttoninstancenamehere.onPress = function() {  
loadMovie(“about\_final.swf”, “\_root.empty”);  
};

should work if not post your fla so we can check it out

---

<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: [May 5, 2003, 2:32am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/6 "2003-05-05T02:32:51Z")

</div>

Thanks!

I get this error when I test movie:

Scene=Scene 1, Layer=menu, Frame=2: Line 1: Statement must appear within on handler  
\_root.empty.onRelease = function() {

---

<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: [May 5, 2003, 3:12am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/7 "2003-05-05T03:12:07Z")

</div>

you use that script in the frame actions, not in the button actions.

---

<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: [May 5, 2003, 4:51am UTC](https://forum.kirupa.com/t/help-with-loading-external-movie/19627/8 "2003-05-05T04:51:34Z")

</div>

yeah sorry i forgot to mention that your supposed to use that script in the timeline not on the actual button, i put all my code in 1 frame this way i dont have to go crazy looking for actions in mcs and buttons its a habit you should start practicing 😉
