Infinite Scroll Help

I am working on an infinitely scrolling image field that reacts to the user’s mouse similar to the one in this tutorial:

http://www.kirupa.com/developer/mx/infinite.htm

The only difference is that my content is much wider than the flash window whereas the one in this tutorial is exactly the size of the Flash window.

The code is:

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

Can anyone help me with this? My deadline is approaching quickly.
Thanks!