Infinite menu help

on this tutorial page:
http://www.kirupa.com/developer/mx/infinite.htm

it shows how to make an infinite menu…in my case im change the menu to a gallery, so its an infinite image gallery, but i have a problem. no matter where on the site my mouse it is causes the menu/gallery to move, and sinse im going to have 3, i dont want them moving when my mouse is not over it.

So, with that said…can someone tell me what script i need to add to this to only make the menu move when its moused over? please help. the script on the menu movie is that of the tutorial, which is listed below:

onClipEvent (load)
{
xcenter=510;
speed=1/50;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-300;
if (_x < -300) _x=0;
}

any and all help is much appreciates. Thanks.