Please can you help. I have created an infinite menu using the Kirupa tutorial and the code below. The menu works fine but I would like to stop it moving when the mouse cursor moves away from the menu. My movie clip for the menu contains navigation buttons.
Code:
onClipEvent (load)
{
xcenter=384;
speed=1/10;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 65) _x=-573;
if (_x < -573) _x=65;
}
Any help would be greatly appreciated.