# addChild :: Then removeChild

**URL:** <https://forum.kirupa.com/t/addchild-then-removechild/293846>\
**Category:** flash\
**Created:** [August 4, 2009, 6:49pm UTC](https://forum.kirupa.com/t/addchild-then-removechild/293846 "2009-08-04T18:49:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [August 4, 2009, 6:49pm UTC](https://forum.kirupa.com/t/addchild-then-removechild/293846/1 "2009-08-04T18:49:52Z")

</div>

Hi,  
I am adding a child to the stage in my first swf

```auto

addChild(new donkey());
var l:Loader = new Loader();
l.load(new URLRequest("next.swf"));
addChild(l);

```

in my next.swf, I have a button which I want to remove the donkey with::

```auto
removeChild(donkey);

```

OK - doesnt work - it doesnt let me export the swf anyhow because the next.swf has no ‘reference’ to donkey existing at all. What’s going on?  
Thanks!!
