# Unload movie

**URL:** https://forum.kirupa.com/t/unload-movie/9686
**Category:** flash
**Created:** [December 16, 2002, 5:12pm UTC](https://forum.kirupa.com/t/unload-movie/9686 "2002-12-16T17:12:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![eyeinfinitude](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@eyeinfinitude](https://forum.kirupa.com/u/eyeinfinitude)
#### Post date: [December 16, 2002, 5:12pm UTC](https://forum.kirupa.com/t/unload-movie/9686/1 "2002-12-16T17:12:16Z")

</div>

I’m a bit confused, I thought I got it, but then again I didn’t. I have a set of buttons that each loads a different swf using the loadmovie action into a empty movie clip named “empty.”

What I wanted to know is how would I unload a loaded movie if a button is clicked?

For example, I press button 1 and it loads blue.swf, now when I press button 2, it unloads blue.swf and loads red.swf.

Anyone have a clue? Thanks in advanced. =)

---

<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: [December 16, 2002, 5:25pm UTC](https://forum.kirupa.com/t/unload-movie/9686/2 "2002-12-16T17:25:34Z")

</div>

Well if you are loading to a movie clip, if you load a new movie onto the same movie clip the movie will replace the currently loaded movie.

So there is no reason to unload it because Flash will unload it automatically.

---

<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: [December 16, 2002, 5:34pm UTC](https://forum.kirupa.com/t/unload-movie/9686/3 "2002-12-16T17:34:49Z")

</div>

Oh wow, well that just shows how much more I need to learn, thanks Lost. I’m working on my gallery section right now so without that loading issue it will save me a lot of time. =)

---

<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: [December 16, 2002, 6:10pm UTC](https://forum.kirupa.com/t/unload-movie/9686/4 "2002-12-16T18:10:12Z")

</div>

but you can unload with the:

```php
unloadMovie (target);

```

or

```php
unloadMovieNum (level);

```

too.🙂

---

<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: [December 16, 2002, 6:16pm UTC](https://forum.kirupa.com/t/unload-movie/9686/5 "2002-12-16T18:16:25Z")

</div>

Yeah, you can use those if you aren’t going to be replacing the movie.
