# HitTest only hits one target

**URL:** <https://forum.kirupa.com/t/hittest-only-hits-one-target/287324>\
**Category:** Uncategorized\
**Created:** [April 29, 2009, 1:48pm UTC](https://forum.kirupa.com/t/hittest-only-hits-one-target/287324 "2009-04-29T13:48:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SonOfChaos](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SonOfChaos](https://forum.kirupa.com/u/SonOfChaos)\
**Post date:** [April 29, 2009, 1:48pm UTC](https://forum.kirupa.com/t/hittest-only-hits-one-target/287324/1 "2009-04-29T13:48:35Z")

</div>

Okay, I hate coming for so much help but I’m miserable here. Basically the code creates 3 sasquatches. When you click on the sasquatch it displays “you be dead sucka!”, well, only ONE of the 3 sasquatches are registering hits, and the one that does traces “you be dead” 4 times. How do I get them all to register? \*Note: big thanks to Flashm on my last problem’s help.

package{

```
import flash.display.*;
import flash.events.*;

public class SQD extends MovieClip{
    public var squatchArray:Array = new Array();
    public var one:Sasquatch;
    
    public function SQD(){
        stage.addEventListener(MouseEvent.MOUSE_DOWN, attack);
        trace('working');
        for(var i:int =0; i&lt;3; i++){
        one=new Sasquatch;
        addChild(one);
        one.x = Math.random()*500;
        one.y = Math.random()*400;
        squatchArray.push(one);
        trace(squatchArray);
        }
    }
    public function attack(mouseEv:MouseEvent){
        trace('Kung Fu Attack');
        for(var t:int = 0; t &lt;=squatchArray.length; t++){
            if(one.hitTestPoint(mouseEv.stageX, mouseEv.stageY, true)){
                trace('You be dead sucka!!')
            }
        }
    }
}

```

}
