# Unload clip with a button in the loaded clip

**URL:** <https://forum.kirupa.com/t/unload-clip-with-a-button-in-the-loaded-clip/247942>\
**Category:** flash\
**Created:** [January 2, 2008, 3:29am UTC](https://forum.kirupa.com/t/unload-clip-with-a-button-in-the-loaded-clip/247942 "2008-01-02T03:29:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_E](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Andreas\_E](https://forum.kirupa.com/u/Andreas_E)\
**Post date:** [January 2, 2008, 3:29am UTC](https://forum.kirupa.com/t/unload-clip-with-a-button-in-the-loaded-clip/247942/1 "2008-01-02T03:29:27Z")

</div>

**Hi and thanks everybody for a great forum!** :disco:

So I want to Unload a clip with a button placed in the loaded clip.

First I have this code for my preloader and movieclip loader:

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target,loaded,total) {  
loader.percent.text = Math.round((loaded/total) \* 100) + “%”;  
}

mclL.onLoadInit = function() {  
loader.\_visible = false;  
loader.percent.text = “”;  
}

mcl.addListener(mclL);

\*\* And this code on my button to load the clip into holder:\*\*

loadClipBtn.onRelease = function() {  
loader.\_visible = true;  
mcl.loadClip(“start.swf”,holder);  
}

And then when my start.swf file has loaded into holder, I want to be able to remove it from holder, with a button placed on start.swf.

\*\* Ive tried this code for the button in start.swf\*\*, it doesnt work there, i think its something with the path?

removeClipBtn.onRelease = function() {  
mcl.unloadClip(holder);  
}

Help is Much appreciated:sure:  
Thanks
