# Hittest?

**URL:** <https://forum.kirupa.com/t/hittest/40712>\
**Category:** Uncategorized\
**Created:** [January 21, 2004, 9:12am UTC](https://forum.kirupa.com/t/hittest/40712 "2004-01-21T09:12:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![franjime](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@franjime](https://forum.kirupa.com/u/franjime)\
**Post date:** [January 21, 2004, 9:12am UTC](https://forum.kirupa.com/t/hittest/40712/1 "2004-01-21T09:12:14Z")

</div>

hello again…big problem again

Ive got a code to move a MC on the main stage together with the mouse, in the the X axis, … difficult to explain. But now the client wants that this MC movement works only when the Y position of the mouse is over the 300 px . I thought I need a hit test or something elese. Please help. Here is the whole code.

function moverPanel(cualClip, numeroBase) {  
if (\_root[cualClip].\_x\>\_root.\_xmouse) {  
diferencia = \_root[cualClip].\_x-\_root.\_xmouse;  
numDeslizar = diferencia/numeroBase;  
\_root[cualClip].\_x = \_root[cualClip].\_x-numDeslizar;  
//\_root[cualClip].\_alpha = numDeslizar;  
}  
if (\_root[cualClip].\_x\<\_root.\_xmouse) {  
diferencia = \_root.\_xmouse-\_root[cualClip].\_x;  
numDeslizar = diferencia/numeroBase;  
\_root[cualClip].\_x = \_root[cualClip].\_x+numDeslizar;  
//\_root[cualClip].\_alpha = numDeslizar;

}  
}

Gracias
