# hitTest() problem

**URL:** <https://forum.kirupa.com/t/hittest-problem/269479>\
**Category:** flash\
**Created:** [August 28, 2008, 4:40am UTC](https://forum.kirupa.com/t/hittest-problem/269479 "2008-08-28T04:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![outlaw\_xXx](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@outlaw\_xXx](https://forum.kirupa.com/u/outlaw_xXx)\
**Post date:** [August 28, 2008, 4:40am UTC](https://forum.kirupa.com/t/hittest-problem/269479/1 "2008-08-28T04:40:38Z")

</div>

Hi everyone,

I am new to flash and i just have a quick question about hitTest() function.

this is my code

```php
.
.
.
if (this.hitTest(_root.player)) {
	_root.target.gotoAndPlay("boom");
    _root.scoreVar++;
}
.
.

```

now what im tring to do is to increment BY ONE whenever collision occurs but instead when the 2 mc’s colide the counter keeps going al song as i keep my mouse over it.

Is there any way for it to count just once when the collision occurs…

thanks for any input
