Confining y pos. of mouse position

I have an mc that changes color based on the mouse position in the fla. What I would like to do is define the y region for the mouse position so that the mc changes only when the mouse is in a specific y range (i only want the mc to play when the mouse moves hor. across a menu bar).

this is what i’m using.

onClipEvent(load){
gotoAndStop(1);
}

onClipEvent(enterFrame){
goto = Math.round(_root._xmouse/10);

gotoAndStop(goto);
}

thanks for any help

I don’t know if i got what you want right

but i think an if statement will solve your problem

just state in the if condition what boundries you want for example:

if (_root._xmouse >= 10 || _root._xmouse <= 100) {
// any movieClip action you want
}

the action you place between the braces will only work when the _xmouse coordinate is inside the regions stated above

:tie:

Thanks.

But I don’t understand how to incorperate the script into my existing script.

Also, the values for x and y (your example 10 & 100) do they represent pixile #'s, ie if my menu is 600 px long and 20 px high and upper corner position is 0/70 would my code look like this??

if (_root._xmouse >= 0 || _root._xmouse <= 600) {
// any movieClip action you want
}

if (_root._ymouse >= 70 || _root._ymouse <= 90) {
// any movieClip action you want
}

thanks