# Code for unloading a movie, while loading another

**URL:** <https://forum.kirupa.com/t/code-for-unloading-a-movie-while-loading-another/99613>\
**Category:** Uncategorized\
**Created:** [January 20, 2004, 4:31pm UTC](https://forum.kirupa.com/t/code-for-unloading-a-movie-while-loading-another/99613 "2004-01-20T16:31:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Huston](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@Huston](https://forum.kirupa.com/u/Huston)\
**Post date:** [January 20, 2004, 4:31pm UTC](https://forum.kirupa.com/t/code-for-unloading-a-movie-while-loading-another/99613/1 "2004-01-20T16:31:49Z")

</div>

I have a movie that initally onloads onto the stage at target MC. I then want this movie to unload when the following button is moused over or clicked for the same MC target. What would be the syntax for this to work with the following?

Button1.onRelease = function() {  
loadMovie(“home.swf”, “target”);  
};

Question 2: What would the syntax look like if the inital movie came into a different target MC named “target 2”?

TIA

B.Huston
