how to remove an addchild for button event

Community Beginner ,
Oct 05, 2020

Copy link to clipboard

Copied

for(var i=0;i<24;i++) { /////////////// BtCerto.push(a[i]) /////////////// var Bt = new lib.objetos; this.addChild(Bt); Bt.on('click',Veri.bind(this)) Bt.on("mouseover",function(e){ this.cursor = "pointer"; }); }

Views

32

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
kglad LATEST
Adobe Community Professional ,
Oct 05, 2020

Copy link to clipboard

Copied

to remove an object from the display, call removeChildF()

 

import flash.display.DisplayObject;

function removeChildF(dobj:DisplayObject):void{

if(dobj && dobj.parent){

dobj.parent.removeChild(dobj);

}

}

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more