# hitTest?

**URL:** <https://forum.kirupa.com/t/hittest/216587>\
**Category:** flash\
**Created:** [February 18, 2007, 4:00pm UTC](https://forum.kirupa.com/t/hittest/216587 "2007-02-18T16:00:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yolkSac](https://avatars.discourse-cdn.com/v4/letter/y/4bbf92/32.png) [@yolkSac](https://forum.kirupa.com/u/yolkSac)\
**Post date:** [February 18, 2007, 4:00pm UTC](https://forum.kirupa.com/t/hittest/216587/1 "2007-02-18T16:00:22Z")

</div>

Can anyone tell me why my hitTest doesn’t work?

Trying to make a knockout fighting game…

Any reference / Tutorial / assistance would be a HUGE help!

Thanks all!

This is the code i put together thus far…

```auto

Mouse.hide();
var clicked = false;

fists_mc.onMouseDown = function() {
        //punches left on first mouse click
        if (clicked == false) {
        fists_mc.left.gotoAndPlay(2);
        clicked = true;
        }
        //punches right on second mouse click
        else if (clicked == true) { 
        fists_mc.right.gotoAndPlay(2);
        clicked = false;
        }
        //THIS IS THE PART THAT IS NOT WORKING... Would like to have character "contact_mc" react to being hit... This aint doing it? trace('hit'); not working either. Any ideas here?
        if ((fists_mc.left.hitLeft.hitTest(_root.contact_mc.h itMe_mc.hitFace_mc)==true) || (fists_mc.right.hitRight.hitTest(_root.contact_mc. hitMe_mc.hitFace_mc)==true)) {
        _root.contact_mc.hitMe_mc.gotoAndPlay(2);
        trace ('hit');
        }
}

fists_mc.onEnterFrame = function() {
        //stick the hands to the cursor
        this._x = _root._xmouse;
        this._y = _root._ymouse;
}

```
