Posted By

allnatural on 03/19/10


name removechild

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Remove Child By Name

 / Published in: ActionScript 3

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

  1. function removeChildWithRef(spriteName:String, parentObj:*){
  2. var t:DisplayObject = parentObj.getChildByName(spriteName);
  3. parentObj.removeChild(t);
  4. }

Report this snippet  

You need to login to post a comment.