# \[mx04\] movieclip onRelease remove itself?

**URL:** <https://forum.kirupa.com/t/mx04-movieclip-onrelease-remove-itself/206855>\
**Category:** Uncategorized\
**Created:** [November 12, 2006, 8:53am UTC](https://forum.kirupa.com/t/mx04-movieclip-onrelease-remove-itself/206855 "2006-11-12T08:53:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [November 12, 2006, 8:53am UTC](https://forum.kirupa.com/t/mx04-movieclip-onrelease-remove-itself/206855/1 "2006-11-12T08:53:43Z")

</div>

I’m loading an external swf with a movieclip button, and at the same time loading a “close” movieclip on the main timeline near it to close the external swf.  
All works fine except that I’d like the "close’ movie clip to also remove itself on release. I can’t seem to get it right.  
here’s what I have

```auto

var thisRoot:MovieClip = this;
         thisRoot.attachMovie("iTWorks_btn","wrk1_btn", 2030690070);
wrk1_btn._x = 169;
wrk1_btn._y = 432;
thisRoot.wrk1_btn.onRelease = function(){
    empty_mc.loadMovie("SorSis_Book.swf");
    empty_mc._x = -90;
    empty_mc._y = 100;
    //attach close_btn
    thisRoot.attachMovie("close_btn", "cls_btn", thisRoot.getNextHighestDepth());
    cls_btn._x = 715;
    cls_btn._y = 250;
    thisRoot.cls_btn.onRelease = function(){
        empty_mc.unloadMovie("SorSis_Book.swf");
        thisRoot.cls_btn.removeMovieClip("cls_btn");
        
        }
    
    }

```

this removes the loaded swf, but the cls\_btn still stays on the stage.  
Anyone know how to do this?
