Remove Child By Name


/ Published in: ActionScript 3
Save to your folder(s)

Pass an Objects instance name and its Parent Object to removeChild from the display list.


Copy this code and paste it in your HTML
  1. function removeChildWithRef(spriteName:String, parentObj:*){
  2. var t:DisplayObject = parentObj.getChildByName(spriteName);
  3. parentObj.removeChild(t);
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.