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