# Invisible instances

**URL:** <https://forum.kirupa.com/t/invisible-instances/330225>\
**Category:** flash\
**Created:** [December 15, 2012, 12:46pm UTC](https://forum.kirupa.com/t/invisible-instances/330225 "2012-12-15T12:46:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Flopsie](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mr\_Flopsie](https://forum.kirupa.com/u/Mr_Flopsie)\
**Post date:** [December 15, 2012, 12:46pm UTC](https://forum.kirupa.com/t/invisible-instances/330225/1 "2012-12-15T12:46:29Z")

</div>

Hi all!  
I never really wanted to ask help online, but I guess nothing bad can come from asking help…

I have a simple flash game where you play as a space ship and collect orbs. After you play one game and go back to the main menu and start a new game it seems that there are 2 instances of the orbs.(Normally the orb just teleports to another location when you collect it) However the second instance is invisible. But when I do touch it, I get the points and the sound plays.

So normally when the game ends I call a function which removes all the children of my main class. I thought maybe that all grandchildren were still there. But I saw someone say that all the grandchildren of a class then also get removed.  
So, is it possible that the eventlisteners are still there or something else?  
This is the code I run when it’s game over.

```auto

while(game.numChildren > 0)
  game.removeChildAt(game.numChildren -1);
removeChild(game);
game = null;

```

Thank you
