Copy link to clipboard
Copied
Right now I have a button that brings a library symbol to the stage. Ideally, I want to be able to click on the symbol itself to make itself from the stage. Can anyone help me with this?
for example:
var sym:WhateverClass=new WhateverClass();
sym.addEventListener(MouseEvent.CLICK,clickF);
function clickF(e:MouseEvent):void{
e.currentTarget.parent.removeChild(e.currentTarget);
}
Copy link to clipboard
Copied
for example:
var sym:WhateverClass=new WhateverClass();
sym.addEventListener(MouseEvent.CLICK,clickF);
function clickF(e:MouseEvent):void{
e.currentTarget.parent.removeChild(e.currentTarget);
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now