# Need help with loading a swf file

**URL:** https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292
**Category:** flash
**Created:** [November 12, 2003, 12:26pm UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292 "2003-11-12T12:26:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Spider](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Spider](https://forum.kirupa.com/u/Spider)
#### Post date: [November 12, 2003, 12:26pm UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292/1 "2003-11-12T12:26:47Z")

</div>

I am a newbie in Flash.  
Here is the problem.  
I built a Flash movie. In that main flash movie, i want to load another small flash movie(movie.swf).  
I used the code: loadMovie(“movie.swf”,target).  
It worked fine. The only problem is that, the amination set out the small movie appears when i load it in the main flash movie.  
The target and the movie( movie.swf) have the same size.  
If i use a mask to hide any animation outside the movie(movie.swf), i have to make lot of changes. I have to make a mask for every graphic.  
Is there an easy way to solve this problem? Please help me.  
Thanks in advance.

---

<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: [November 12, 2003, 1:41pm UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292/2 "2003-11-12T13:41:16Z")

</div>

Loading a movie using loadMovie() loadMovieNum() places that movie on stage either in a \_level or in an instance on an existing MC. Unles told otherwise, the default action of a loaded movie is to play.

Assuming you only want the animation in your movie to play following a specified event (e.g. in response to a button release)

Create a blank keyframe in the first frame of the loaded animation and add a stop() action to pause this swf on the first frame.

When you to see the animation use target.play() where target is the path to the loaded clip

---

<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: [November 12, 2003, 11:46pm UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292/3 "2003-11-12T23:46:43Z")

</div>

Thanks for your reply. I still dont have a clue.  
The animation on the small movie is like this:  
I put a graphic on the left side of the stage. With tweening animation i make it slide the right side.  
When i test the small movie alone, i see the graphic only on the stage. But when i load it in the Main Flash movie, the graphic can be seen eventho it is not in the small movie stage.  
When i masked the stage for every graphic, it works. But there are lots of graphics in the movie and i was hoping if there is an easy way to make the graphics only seen on 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: [November 13, 2003, 3:50pm UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292/4 "2003-11-13T15:50:59Z")

</div>

I think this is what you’re looking for …

---

<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: [November 14, 2003, 5:55am UTC](https://forum.kirupa.com/t/need-help-with-loading-a-swf-file/35292/5 "2003-11-14T05:55:09Z")

</div>

Thanks jsk.  
That is what i was looking for.  
In my problem i loaded the swf file in the same level with the main movie. Thats why it went wrong. Thanks again.
