Posted By

allnatural on 03/19/10


Tagged

name removechild


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

socialflasher
starpause


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.