-
closing a movie clip with a mouse click?
I have a button that loads a movie clip and I want to be able to close that same movieclip by clicking anywhere.
This is my code so far:
btn_2.addEventListener(MouseEvent.CLICK, goBio);
function goBio (e:MouseEvent):void {
var newBio:BioToc = new BioToc();
this.addChild(newBio);
newBio.x = 25;
newBio.y = 45;
}
-
Firstly make newBio a member variable. You can then add a click event to the stage and remove the newBio movieclip.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|