# Mouse hit test with score

**URL:** <https://forum.kirupa.com/t/mouse-hit-test-with-score/98858>\
**Category:** Uncategorized\
**Created:** [January 12, 2004, 6:39am UTC](https://forum.kirupa.com/t/mouse-hit-test-with-score/98858 "2004-01-12T06:39:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mako](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mako](https://forum.kirupa.com/u/mako)\
**Post date:** [January 12, 2004, 6:39am UTC](https://forum.kirupa.com/t/mouse-hit-test-with-score/98858/1 "2004-01-12T06:39:27Z")

</div>

Hi,

I have a small game thats incorporated into an ecard. basically you have to hit an object that appears randomly on a grid.  
My problem is everytime you hit the object … it goes from 1-10 very quickly does not record 1 hit at a time…

I have asked this question before, and previously I had used a && Beenhit variable in an if else statement which worked fine with 2 MC’s. But it does not seem to work with the mouse hit test.

this is what I am using:  
[AS]  
sb.onEnterFrame = function() {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
\_root.score ++ ;  
\_root.flasher.gotoAndPlay(10);  
}  
[/AS]

Any ideas …  
Thanx V much. mako 🙂
