# UnloadMovie problem

**URL:** <https://forum.kirupa.com/t/unloadmovie-problem/294745>\
**Category:** flash\
**Created:** [August 19, 2009, 10:53am UTC](https://forum.kirupa.com/t/unloadmovie-problem/294745 "2009-08-19T10:53:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Centifolia](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@Centifolia](https://forum.kirupa.com/u/Centifolia)\
**Post date:** [August 19, 2009, 10:53am UTC](https://forum.kirupa.com/t/unloadmovie-problem/294745/1 "2009-08-19T10:53:19Z")

</div>

hi -  
I have a movieclip where a movie is being loaded and which can be closed via a close button. This works fine with the following script:

```auto
var quiz = this.createEmptyMovieClip("quiz", this.getNextHighestDepth());
quiz.loadMovie("quiz.swf");

closed.onPress = function(){

unloadMovie(quiz)
}

```

But when the movie is loaded (and the close button has not been pressed) and I click on a button on the root this movie is still visible.  
I tried it with this script on the button on the root.

```auto
animation.unloadMovie(quiz);

```

It didn’t work. Can anyone please help?
