Can't stop a scrolling menu

I can’t seem to stop my scrolling menu. Its an infinate menu but instead of going around and around, I want it to stop at both ends once the user reaches the end. The code on the menu bar is as follows

 onClipEvent (load)
{
   xcenter=150;
   speed=1/10;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x+=(distance*speed);
}
 onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x+=(distance*speed);
   if (_x < 0) stop();
   if (_x > -1130) stop();
}

The attachment is the said file, if anyone can solve this problem I’d be ever so greatful, me and my beginner questions:crying: