# movieClipLoader issue - targeting a button in the loaded clip

**URL:** <https://forum.kirupa.com/t/moviecliploader-issue-targeting-a-button-in-the-loaded-clip/136217>\
**Category:** Uncategorized\
**Created:** [February 3, 2005, 3:32am UTC](https://forum.kirupa.com/t/moviecliploader-issue-targeting-a-button-in-the-loaded-clip/136217 "2005-02-03T03:32:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beekay1076](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@beekay1076](https://forum.kirupa.com/u/beekay1076)\
**Post date:** [February 3, 2005, 3:32am UTC](https://forum.kirupa.com/t/moviecliploader-issue-targeting-a-button-in-the-loaded-clip/136217/1 "2005-02-03T03:32:13Z")

</div>

Hi there,

Hoping somebody can help me.  
I’m loading an external swf using the new movieClipLoader class, which works great. I’m having trouble with getting a button to unload the movie, and not exactly sure why.

Here’s the part of my loading script that I’m struggling with:  
(I have a button in the \_root of my loaded clip with the instance name closeAd)

[color=green]mclListener.onLoadInit = function(target\_mc:MovieClip) {  
target\_mc.width = 528;  
target\_mc.height = 487;  
target\_mc.play();  
**target\_mc.closeAd.onRelease** = function() {  
image\_mcl.unloadClip(target\_mc);  
\_root.gotoAndStop(“menuFrame”);  
}  
};[/color]

However if I put the onRelease command directly onto the image\_mc, the script works perfectly. eg:

[color=green]mclListener.onLoadInit = function(target\_mc:MovieClip) {  
target\_mc.width = 528;  
target\_mc.height = 487;  
target\_mc.play();  
**target\_mc.onRelease** = function() {  
image\_mcl.unloadClip(target\_mc);  
\_root.gotoAndStop(“menuFrame”);  
}  
};[/color]  
[color=#008000][/color]  
[color=#008000][/color]  
[color=black]I don’t get it. If anyone knows how I can get the button to work please let m know.[/color]

Thanks in advance,

BeeKay
