/ Published in: ActionScript 3
This function will delete and object and mark it for deletion with gc.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * _deleteObject function * Removes the specified object from the parent object and nulls the object. * * @param obj:Object The specific object to remove */ private function _deleteObject(obj:Object):void { if (obj.parent) obj.parent.removeChild(obj); obj = null; }