# Load/Unload \*.swf movies question

**URL:** https://forum.kirupa.com/t/load-unload-swf-movies-question/12367
**Category:** flash
**Created:** [January 30, 2003, 6:37am UTC](https://forum.kirupa.com/t/load-unload-swf-movies-question/12367 "2003-01-30T06:37:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![driver](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@driver](https://forum.kirupa.com/u/driver)
#### Post date: [January 30, 2003, 6:37am UTC](https://forum.kirupa.com/t/load-unload-swf-movies-question/12367/1 "2003-01-30T06:37:10Z")

</div>

Hi,

I’m wondering if there isn’t a better and easier way to do this…

I have a scene with 9 buttons opening each a \*.swf movie  
example: on Home I attach the action:  
on (release) {  
gotoAndStop (2);  
}  
// other buttons goto and stop frame 3,4,5,6…

on Frame 2 there is a blank keyframe with the action:

stop ();  
loadMovieNum (“home.swf”, 2);  
unloadMovieNum (1);  
unloadMovieNum (3);  
unloadMovieNum (4);  
unloadMovieNum (5);  
unloadMovieNum (6);  
unloadMovieNum (7);  
unloadMovieNum (8);  
unloadMovieNum (9);  
unloadMovieNum (10);  
unloadMovieNum (11);

on frame 3,4,5,6… there is the same action, only loading it’s specific movie and unloading the movie that was allready open.  
I do this because a visitor can click randomly on a button without having the problem of movies overlapping eachother.

A reasonable action would be:  
stop ();  
loadMovieNum (“home.swf”, 2);  
unloadMovieNum (1,2,3,4,5,6,7,8,9);

or

stop ();  
loadMovieNum (“home.swf”, 2);  
stopallmovies ();

second question:  
what about a \*swf movie(1.3) loaded into a \*swf movie(1.2) witch is loaded into a \*swf movie(1.1)?  
can I unload movie 1.3 seperatly?

thanx 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: [January 30, 2003, 2:54pm UTC](https://forum.kirupa.com/t/load-unload-swf-movies-question/12367/2 "2003-01-30T14:54:05Z")

</div>

I dont know what you mean wth the 1.2 stuff … but what about just loading all your swfs into the same level. That would replace the existing swf with the new and you wouldnt have to worry about unloading every other level that you used

---

<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: [January 30, 2003, 5:52pm UTC](https://forum.kirupa.com/t/load-unload-swf-movies-question/12367/3 "2003-01-30T17:52:36Z")

</div>

O.K. that works , but I have read somewhere that it is important to unload the movies as well…

[http://www.jessy-music.be](http://www.jessy-music.be)
