# Buttons stop working

**URL:** <https://forum.kirupa.com/t/buttons-stop-working/305121>\
**Category:** Uncategorized\
**Created:** [February 19, 2010, 12:48pm UTC](https://forum.kirupa.com/t/buttons-stop-working/305121 "2010-02-19T12:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxelcat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maxelcat/32/2854_2.png) [@maxelcat](https://forum.kirupa.com/u/maxelcat)\
**Post date:** [February 19, 2010, 12:48pm UTC](https://forum.kirupa.com/t/buttons-stop-working/305121/1 "2010-02-19T12:48:15Z")

</div>

Hi

I have a continer mc called lightBoxCont that I load a class into

```auto
lbx.initLightBox(12, Number(slideIndex), urls, titleText); 
  lightBoxCont.addChild(lbx);

```

when the user clicks on a thumbnail

the user can close the lightbox by clicking on a button like this

```auto

this.removeChild(lightBoxCont);

```

This all works (or seems to). If the user then clicks on another thumbnail the light box appears again, but the buttons don’t work. These were added in the class lightbox.

Interestingly if I trace teh number of children that lbx has I find that each time the user presses on a thumbnail it goes up. First time its about 30, next time its about 60, next time its 90 and so on.

I think this is causing the problem with the buttons not working

What should I do in order to make this work properly?

thanks

E
