# Remove a hitTestObject in a Game

**URL:** <https://forum.kirupa.com/t/remove-a-hittestobject-in-a-game/326249>\
**Category:** flash\
**Created:** [December 1, 2011, 6:30pm UTC](https://forum.kirupa.com/t/remove-a-hittestobject-in-a-game/326249 "2011-12-01T18:30:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MFRS](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MFRS](https://forum.kirupa.com/u/MFRS)\
**Post date:** [December 1, 2011, 6:30pm UTC](https://forum.kirupa.com/t/remove-a-hittestobject-in-a-game/326249/1 "2011-12-01T18:30:20Z")

</div>

Basically every functions without hitTests are removed without errors, but all the hittestobjects that i have in the end game frame says that it cannot acess a null hitTestObject. One of the hitTests i have is this one:

> if (this.hitTestObject(\_root.anulpowerups)) {  
> this.parent.removeChild(this);  
> removeEventListener(Event.ENTER\_FRAME, checkCollision);

```
            }

```

How can i remove them successfully?
