# How to have a movie unload automatically when it is done playing

**URL:** <https://forum.kirupa.com/t/how-to-have-a-movie-unload-automatically-when-it-is-done-playing/55280>\
**Category:** Uncategorized\
**Created:** [June 22, 2004, 4:22pm UTC](https://forum.kirupa.com/t/how-to-have-a-movie-unload-automatically-when-it-is-done-playing/55280 "2004-06-22T16:22:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toddot](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@toddot](https://forum.kirupa.com/u/toddot)\
**Post date:** [June 22, 2004, 4:22pm UTC](https://forum.kirupa.com/t/how-to-have-a-movie-unload-automatically-when-it-is-done-playing/55280/1 "2004-06-22T16:22:49Z")

</div>

hi all

I have used the following script to load a movie

but.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“scene\_1.swf”, “container”);  
container.\_x = 150 ;  
container.\_y = 20 ;  
}

this works great, but now when the movie scene\_1.swf is finished playing I would like the movie to unload automatically and return to the mainstage and continue the scene on the mainstage

is this possible?

thanks in advance  
toddot
