how to remove an addchild for button event

Community Beginner ,
Oct 05, 2020 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

51

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines