# How do i cancel a hit test

**URL:** <https://forum.kirupa.com/t/how-do-i-cancel-a-hit-test/179232>\
**Category:** Uncategorized\
**Created:** [February 17, 2006, 8:52pm UTC](https://forum.kirupa.com/t/how-do-i-cancel-a-hit-test/179232 "2006-02-17T20:52:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [February 17, 2006, 8:52pm UTC](https://forum.kirupa.com/t/how-do-i-cancel-a-hit-test/179232/1 "2006-02-17T20:52:15Z")

</div>

i have a onEnterFrame running thats checking with hit test like so:

if (this.hitTest(black\_mc)) {  
// do stuff  
}

how do i stop the mc referenced by “this” from checking to see if it’s touching “black\_mc”.

I’ve tried just deleteing the onEnterFrame, but theres other things happening in my movie that make these two mcs touch, which is fine, but I dont want the scripts running (// do stuff) after a certain point.
