[flexcoders] Re: how to remove new object in stage
okay, it works thanks :D --- In flexcoders@yahoogroups.com, Alex Harui wrote: > > 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); > function addSmallFunction(e:MouseEvent):void > { > addChild(tesObj); > removeSmall.addEventListener(MouseEvent.CLICK, removeSmallFunction); > } > function removeSmallFunction(e:MouseEvent):void > { > tes("idTesObj"); > } > function tes(n:String):void > { > //removeChild(n); > trace(n); > } > > > > > > > -- > Alex Harui > Flex SDK Team > Adobe Systems, Inc. > http://blogs.adobe.com/aharui >
Re: [flexcoders] Re: how to remove new object in stage
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); function addSmallFunction(e:MouseEvent):void { addChild(tesObj); removeSmall.addEventListener(MouseEvent.CLICK, removeSmallFunction); } function removeSmallFunction(e:MouseEvent):void { tes("idTesObj"); } function tes(n:String):void { //removeChild(n); trace(n); } -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: how to remove new object in stage
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.addEventListener(MouseEvent.CLICK, removeSmallFunction); } function removeSmallFunction(e:MouseEvent):void { tes("idTesObj"); } function tes(n:String):void { //removeChild(n); trace(n); }