# Using "load" clip event to Load movies

**URL:** https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427
**Category:** Uncategorized
**Created:** [September 16, 2004, 5:39am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427 "2004-09-16T05:39:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Pup\_100](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@Pup\_100](https://forum.kirupa.com/u/Pup_100)
#### Post date: [September 16, 2004, 5:39am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/1 "2004-09-16T05:39:48Z")

</div>

[font=Times New Roman]Is it possible to use the [color=blue]“onClipEvent (load)”[/color] event to load movies at run time?[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]I have the following code on a clip instance, but it will not load the required movie.[/font]

[font=Times New Roman] [/font]

[font=Times New Roman][color=blue]onClipEvent (load) {loadMovie(“go2H.swf”,\_root.phil);[/color][/font]

[font=Times New Roman][color=blue]}[/color][/font]

[font=Times New Roman] [/font]

[font=Times New Roman]"go2H.swf” is in the same local directory as the host movie.[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]Thank you for any help.[/font]

[font=Times New Roman] [/font]

---

<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: [September 16, 2004, 6:36am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/2 "2004-09-16T06:36:13Z")

</div>

Try out this instead of add code directly apply on MC. Add this code to first frame of the movie

//myclip movieclip acts as the event trigger  
//\_root.holder is the target movieclip

\_root.myclip.onLoad = function (){  
loadMovie(“mymovie.swf”,\_root.holder);  
}

---

<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: [September 16, 2004, 9:11am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/3 "2004-09-16T09:11:44Z")

</div>

No Joy with that I’m afraid abhilashkk, but I did get what I wanted with this code;

[color=blue]\_root.onLoad = function (){  
loadMovie(“go2H.swf”,\_root.phil);  
}[/color]  
[color=#0000ff][/color]  
[color=black]Anyone any idea why this would not work when placed directly on the clip instance?[/color]

---

<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: [September 16, 2004, 9:47am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/4 "2004-09-16T09:47:29Z")

</div>

Ok…make a change in your code like this… actually my intentions were not bad… :x

```auto
 
onClipEvent (load) {
 _root.phil.loadMovie("go2H.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: [September 16, 2004, 10:04am UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/5 "2004-09-16T10:04:32Z")

</div>

Thank you for your help sir, I will give that a go. 🙂

---

<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: [September 16, 2004, 1:04pm UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/6 "2004-09-16T13:04:49Z")

</div>

why not just use the loadmovie action in the frame at which you want the movie to load? So just put loadmovie (,) whereever you want on the timeline and it’ll open it up. Just curious why you need all this extra code?

---

<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: [September 16, 2004, 1:31pm UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/7 "2004-09-16T13:31:17Z")

</div>

I was just trying a few things out in MX byersj21. You are right a script in the frame would have worked the same.  
🙂

---

<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: [September 16, 2004, 4:14pm UTC](https://forum.kirupa.com/t/using-load-clip-event-to-load-movies/64427/8 "2004-09-16T16:14:26Z")

</div>

ah… ok… just curious… didn’t know if you were doing something different that would work better or what. Always good to try new things anywayz…
