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);
}

Reply via email to