Saturday, August 14, 2010

removeChild() from the child itself AS3

function destroyMe(object:*):void {
        if(object.parent != null){
                var parent:DisplayObjectContainer = object.parent;
                parent.removeChild(object);
        }
}

No comments: