# hitTests on multiple objects

**URL:** https://forum.kirupa.com/t/hittests-on-multiple-objects/86022
**Category:** flash
**Created:** [April 9, 2005, 9:28am UTC](https://forum.kirupa.com/t/hittests-on-multiple-objects/86022 "2005-04-09T09:28:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![foodpk](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@foodpk](https://forum.kirupa.com/u/foodpk)
#### Post date: [April 9, 2005, 9:28am UTC](https://forum.kirupa.com/t/hittests-on-multiple-objects/86022/1 "2005-04-09T09:28:40Z")

</div>

How would you go about solving this?  
For instance, I have a bullet movieclip and it moves. I’ve put a hitTest on its onEnterFrame so that it checks if it hits its target, whose instance name is mmbug and the target flies around. That’s easy and works cool.  
( see [http://blippo.addr.com/misc/walker2.html](http://blippo.addr.com/misc/walker2.html) , there’s only one wasp present at a time and it works)  
Now what I want to do is duplicate the wasps so there are more flying around at one time, but how would I do the hitTest on the bullet then, because you have to specify it an exact instance name. If I make all the wasps have the same instance names it doesn’t work. So obviously I’d have to give them names of mmbug1, mmbug2, mmbug3 etc. But how would I check on the hitTest if it hits any of them, since you have to put in an exact instance name in the hitTest?  
Thanks!
