# Loading movies into one .swf

**URL:** <https://forum.kirupa.com/t/loading-movies-into-one-swf/21845>\
**Category:** Uncategorized\
**Created:** [May 27, 2003, 8:53am UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845 "2003-05-27T08:53:27Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![flying\_monkey](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@flying\_monkey](https://forum.kirupa.com/u/flying_monkey)\
**Post date:** [May 27, 2003, 8:53am UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/1 "2003-05-27T08:53:27Z")

</div>

o.k im a noob to flash and actionscript so this question is proberly very simple…

```
i have a .swf file that i want to be in another movie, so i can reduce the loading time of the main movie is there any simple way i can do this useing actionscript:q: 

thanks alot :cowboy:
```

---

<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 27, 2003, 8:56am UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/2 "2003-05-27T08:56:36Z")

</div>

Yup, you’ll need to use the loadMovie action, here’s a tutorial.

[http://www.kirupa.com/developer/mx/full\_site.htm](http://www.kirupa.com/developer/mx/full_site.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:** [May 27, 2003, 10:02am UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/3 "2003-05-27T10:02:09Z")

</div>

hmm…

is there anyway of doing that but without a button so it just loads there strait away?

---

<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 27, 2003, 3:08pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/4 "2003-05-27T15:08:52Z")

</div>

please help ;(

---

<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 27, 2003, 3:14pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/5 "2003-05-27T15:14:43Z")

</div>

make a blank mc give it these actions:  
on(release){  
loadMovieNum("yourmovie.swf,1);  
}

---

<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 27, 2003, 4:24pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/6 "2003-05-27T16:24:33Z")

</div>

i tryed useing those actions but i didnt work ☹

---

<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 27, 2003, 4:46pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/7 "2003-05-27T16:46:19Z")

</div>

flying monkey: that script will indeed work however i must appologize, i gave the wrong script ☹

do this:  
create a blank mc and give it theese actions:

onClipEvent(load){  
loadMovieNum(“your.swf”,1);  
}

this will load your initail .swf with out having a button call it.

try agian, i promise that works :0

---

<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 27, 2003, 4:47pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/8 "2003-05-27T16:47:01Z")

</div>

oh and dont forget to drag that blank mc to the stage

---

<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 27, 2003, 4:48pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/9 "2003-05-27T16:48:45Z")

</div>

You don’t really need to place it in a event handler, you can just place the loadMovie onto a frame so when that frame is played, it will load the movie. So on a frame just place the loadMovie script:[AS]loadMovieNum(“your.swf”,1);[/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:** [May 27, 2003, 4:50pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/10 "2003-05-27T16:50:01Z")

</div>

good point electron 🙂

---

<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 27, 2003, 4:59pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/11 "2003-05-27T16:59:59Z")

</div>

o.k its working but there is still one proberlem even know the movieclip is near the bottem of the page the seprate .swf is loading at the top  
how can i change this so it loads were i want it to?

---

<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 27, 2003, 5:13pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/12 "2003-05-27T17:13:06Z")

</div>

go into your .swf that is loading and place in on the page where you want it to be loaded. a good way to do this is to copy and past your swf into your index.swf and postion it o where it shoudl be. then cut and paste into the swf which shoudl be loading. you can also use targeting but i choose not to becuase i find the other way more effective

---

<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 27, 2003, 5:34pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/13 "2003-05-27T17:34:13Z")

</div>

sorry i dont understand what you mean, could you explain it another way

---

<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 27, 2003, 6:06pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/14 "2003-05-27T18:06:39Z")

</div>

Here’s another way of doing that is probably easier. This script will create a empty movieclip on the maintimeline so that you can load your movie into. It will also position the movie where ever you want it to be by defining the x and y locations.[AS]\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“your.swf”, “container”);  
container.\_x = 200;  
container.\_y = 300;  
[/AS]

Container is the instance name of the empty movieclip that is created. Just plug in different numbers for the x and y until you get the desired postion.

---

<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 27, 2003, 6:22pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/15 "2003-05-27T18:22:18Z")

</div>

o.k… this is strange

i have done exactly what you said, there are no errors in the actionscript, but there is no sign of the seprate .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:** [May 27, 2003, 6:29pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/16 "2003-05-27T18:29:57Z")

</div>

Try this and check your x and y cordinates to see if it didn’t load off the area of your movie. x =0 and y =0 would be the top left corner of your movie.

---

<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 27, 2003, 6:33pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/17 "2003-05-27T18:33:40Z")

</div>

thanks :cowboy:

its working now 😃

---

<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 27, 2003, 6:36pm UTC](https://forum.kirupa.com/t/loading-movies-into-one-swf/21845/18 "2003-05-27T18:36:18Z")

</div>

no problem =)
