I have a button that loads a movie clip and I want to be able to close that same movieclip by clicking anywhere. The first part works and will open the mc but I need help with the second part to click anywhere and to close the mc.
This is my script so far:
var newBio = new BioToc();
btn_2.addEventListener(MouseEvent.CLICK, goBio);
function goBio (e:MouseEvent):void {
this.addChild(newBio);
newBio.x = 25; newBio.y = 45;
function removeMC (e:MouseEvent):void {
removeChild(newBio);
stage.removeEventListener(MouseEvent.CLICK,removeMC);
btn_2.addEventListener(MouseEvent.CLICK, goBio);
}
}