Infinate Menu Problems

Can anyone help, I looked at this tutorial on making an infinite menu and found it to be very useful:

the menu scrolls backward and forward following your mouse. I only want the menu to move when the mouse is over the menu.

I have changed the script so the menu is activated on(rollOver) but need help in telling the menu to stop when the mouse is not over it.

The script I am using at the moment is:

onClipEvent (enterFrame)
var distance=_root._xmouse-xcenter;
if (_x > 0) _x=-300;
if (_x < -300) _x=0;

Any suggestions??