Skip to main content
Participating Frequently
August 14, 2007
Question

removing dynamically created movieclips

  • August 14, 2007
  • 2 replies
  • 205 views
i'm adding a movieclip from the library to the stage, then moving it with the Tweener class and finally want to remove it when all is done. As you can see from the code i'm getting a trace when i get to the removeClip() function that i made, everything works up to here. I'm just not sure how to use removeChild and how to identify the instance that is created by addChild. Any help would be brilliant

This topic has been closed for replies.

2 replies

Participating Frequently
August 14, 2007
how do i do this - sorry for being dumb, but i'm not sure of the best way to create unique names and keep track of them in AS3
kglad
Community Expert
Community Expert
August 14, 2007
pass the name of the bluecircle that you want to remove. (bluecircle extends the movieclip class, correct?):

kglad
Community Expert
Community Expert
August 14, 2007
give each newCircle a different reference or, even easier, give each a different name and use the getChildByName() method to remove the BlueCircle() instance that you want.