# Hit test for instances

**URL:** <https://forum.kirupa.com/t/hit-test-for-instances/98400>\
**Category:** Uncategorized\
**Created:** [January 6, 2004, 9:24pm UTC](https://forum.kirupa.com/t/hit-test-for-instances/98400 "2004-01-06T21:24:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojoNYC](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mojoNYC](https://forum.kirupa.com/u/mojoNYC)\
**Post date:** [January 6, 2004, 9:24pm UTC](https://forum.kirupa.com/t/hit-test-for-instances/98400/1 "2004-01-06T21:24:36Z")

</div>

hi all-

i’m making a small shoot 'em up game, and i’ve got 2 classes, alienClass, and heroClass-- the hero fires bullets at the aliens, which hold the hitTest code–ive got it working for a instance, like this:

```auto

	if(this.hitTest(_level0.photonBullet)){ //
		this.imDead(myNum);
		alien_anim.gotoAndPlay("killed"); //calls explosion animated MC
		 }

```

now, i want to expand my game by having multiple bullets at the same time–my question is if there’s anyway to do a hitTest for all instances of the same MC onstage, or alternatively, what’s the best way to do this? thanx in advance!

regards,  
-mojo
