# Adding and removing childs - how to do it safe

**URL:** <https://forum.kirupa.com/t/adding-and-removing-childs-how-to-do-it-safe/238659>\
**Category:** Uncategorized\
**Created:** [September 13, 2007, 5:54pm UTC](https://forum.kirupa.com/t/adding-and-removing-childs-how-to-do-it-safe/238659 "2007-09-13T17:54:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonardoZimbres](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/leonardozimbres/32/4035_2.png) [@LeonardoZimbres](https://forum.kirupa.com/u/LeonardoZimbres)\
**Post date:** [September 13, 2007, 5:54pm UTC](https://forum.kirupa.com/t/adding-and-removing-childs-how-to-do-it-safe/238659/1 "2007-09-13T17:54:18Z")

</div>

Hello Kirupa Forum,

I got a problem with something, hope if someone know the awser.

I did a site navigation based on frames. When the site is on frame1, it addChild of a movieclip called ‘mc’. But when I go to frame 2, I dont need mc anymore, so I call removeChild to remove the undesired mc. But when I go from another frame and step in frame 2 again, the mc does no exist and the code halts on the removeChild line. Someone have a good idea?
