# Hit test question

**URL:** <https://forum.kirupa.com/t/hit-test-question/224428>\
**Category:** flash\
**Created:** [May 2, 2007, 10:22am UTC](https://forum.kirupa.com/t/hit-test-question/224428 "2007-05-02T10:22:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen501](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@stephen501](https://forum.kirupa.com/u/stephen501)\
**Post date:** [May 2, 2007, 10:22am UTC](https://forum.kirupa.com/t/hit-test-question/224428/1 "2007-05-02T10:22:47Z")

</div>

Hi,  
I want to check if a mc has hit a duplicated mc, what is needed on the below script as it doesnt appear to work? I believe its something about check for part of a name, ie looking for bullet when bullet1, bulllet2, bullet3 etc have been duplicated.

Code:  
targetmc.onEnterFrame = function() { this.\_y += \_root.speed; if (this.\_y\>=700) { this.\_x = random(800); this.\_y = 50; } if (this.hitTest(String(\_name) != “bullet”)) { \_root.score++; this.\_x=random(800) this.\_y=-100 }};  
Cheers  
Steve
