Re: [flexcoders] Re: how to remove new object in stage

2012-05-20 Thread Alex Harui
Maybe use getChildByName? On 5/20/12 9:59 PM, "cholid" wrote: sory for the last complete code, this is the new complete code : import flash.events.MouseEvent; var tesObj:TesObj = new TesObj(); tesObj.name = "idTesObj"; addSmall.addEventListener(MouseEvent.CLICK, addSmallFunction); functi

[flexcoders] Re: how to remove new object in stage

2012-05-20 Thread cholid
sory for the last complete code, this is the new complete code : import flash.events.MouseEvent; var tesObj:TesObj = new TesObj(); tesObj.name = "idTesObj"; addSmall.addEventListener(MouseEvent.CLICK, addSmallFunction); function addSmallFunction(e:MouseEvent):void { addChild(tesObj); removeSmall

[flexcoders] how to remove new object in stage

2012-05-20 Thread cholid
hi all in my app i've add new object new tesObj:TesObj = new TesObj(); addChild(tesObj); and the after i give it instance name tesObj.name = "idTesObj"; but when i want to remove it, it doesnt work because hasn't found id "idTesObj" //removeChild(idTesObj); any help ? this complete code :