# hitTest Check for Variable?

**URL:** <https://forum.kirupa.com/t/hittest-check-for-variable/81220>\
**Category:** flash\
**Created:** [February 28, 2005, 11:39pm UTC](https://forum.kirupa.com/t/hittest-check-for-variable/81220 "2005-02-28T23:39:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![earph](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/earph/32/79_2.png) [@earph](https://forum.kirupa.com/u/earph)\
**Post date:** [February 28, 2005, 11:39pm UTC](https://forum.kirupa.com/t/hittest-check-for-variable/81220/1 "2005-02-28T23:39:45Z")

</div>

I’m using the hitTest below and I need it to check for a variable at the same time it checks for the hitTest. Is that possible? How?

> 

onClipEvent (enterFrame) {

if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.nextFrame();  
} else {  
this.prevFrame();  
}  
}
