# Need help with a removeChild type dealie

**URL:** <https://forum.kirupa.com/t/need-help-with-a-removechild-type-dealie/325429>\
**Category:** Uncategorized\
**Created:** [October 14, 2011, 5:29pm UTC](https://forum.kirupa.com/t/need-help-with-a-removechild-type-dealie/325429 "2011-10-14T17:29:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronson5](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@ronson5](https://forum.kirupa.com/u/ronson5)\
**Post date:** [October 14, 2011, 5:29pm UTC](https://forum.kirupa.com/t/need-help-with-a-removechild-type-dealie/325429/1 "2011-10-14T17:29:26Z")

</div>

Hi there-  
Am pretty new to AS3 and would love some help. Basically I have a photo gallery that runs in a container, which is added to the stage like so:

import com.xmlphotoalbum.\*;  
var gallery:XmlPhotoAlbum = new XmlPhotoAlbum();  
gallery\_container.addChild(gallery);

I want to have it set up so when you click on a “gallery” button, it reloads/refreshes the gallery to its initial state, because the “internal” navigation of the gallery isn’t very intuitive…and so the only thing I can think of is essentially to remove the gallery and re-add it, whenever “gallery” button is clicked, which resets the gallery to its initial thumbnail view.

I’ve tried fumbling around with removeChild, addChild, simple if statements, etc.  
Can anyone help?
