# Unload attached movie

**URL:** <https://forum.kirupa.com/t/unload-attached-movie/314108>\
**Category:** flash\
**Created:** [September 18, 2010, 12:56pm UTC](https://forum.kirupa.com/t/unload-attached-movie/314108 "2010-09-18T12:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohya](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@ohya](https://forum.kirupa.com/u/ohya)\
**Post date:** [September 18, 2010, 12:56pm UTC](https://forum.kirupa.com/t/unload-attached-movie/314108/1 "2010-09-18T12:56:46Z")

</div>

I attach movie from library and place it on a fixed location of the stage. I want only 1 mc to be attached on stage and onPress any one of the buttons the previous mc will disppear and new attached mc replaced.  
Like,

btn.onPress=function(){attachMovie(“cat”,“cat1”,0);cat1.\_x=20;cat1.\_y=150;}  
btn1.onPress=function(){unloadMovie(“Previously appear mc”; attachMovie(“dog”,“dog1”,0);dog1.\_x=20;dog1.\_y=150;}

Please show me how ?
