# unloadMovie?

**URL:** <https://forum.kirupa.com/t/unloadmovie/227402>\
**Category:** Uncategorized\
**Created:** [May 30, 2007, 12:02am UTC](https://forum.kirupa.com/t/unloadmovie/227402 "2007-05-30T00:02:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@rohan](https://forum.kirupa.com/u/rohan)\
**Post date:** [May 30, 2007, 12:02am UTC](https://forum.kirupa.com/t/unloadmovie/227402/1 "2007-05-30T00:02:38Z")

</div>

I’m having some issues with this and was wondering if someone could help me out…

I am loading an external SWF into a movie clip that is located on the main timeline like this:

```auto
 
loadMovie("testEX.swf", "movieLoader");

```

then, once that movie has loaded, clicking on it creates an empty movie clip containing an SWF which has video contained within it;

```auto
 
this.preview.onPress = function (){
 createEmptyMovieClip("testMovie", 3);
 loadMovie ("testMovie.swf", "testMovie");
 testMovie._x = -55;
 testMovie._y = 0;
}

```

now this all works fine, the problem is that I can’t figure out how to unload “testMovie”. I want to be able to put a button somewhere in testMovie.swf that unloads testMovie…but when I use this code (within testMovie):

```auto
 
closeButton.onPress = function () {
_root.unloadMovie ("testMovie");
}

```

the whole flash file unloads itself and I see a blank screen…

I’ve tried using unloadMovieNum to target the level that testMovie is on but that doesn’t work…Do I need to load a blank movie into testMovie to clear it? there must be a cleaner way…so any help would be greatly appreciated!

thanks in advance.
