Scrolling horizontal menu with mouse

Hi,

I have made a side scrolling menu with Pom’s Infinate Menu tutorial which kinda works fine but, instead of just keep on scrolling round and round, I want it to stop when it reaches the end of the menu movie clip (the menu movie clip is made up of typical looking ‘film cells’)

Ths is the code i’ve used;

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

Here’s a link to the .fla too;
http://www.blackheathproducts.co.uk/menu001.fla

I just can’t figure out how to make it work in this way. :tired:

Can anyone help me on this one?