Limiting scrolling

Hi all,
Another quick one, I think simple though.
I have a mc that scrolls left or right depending on the _x position of the mouse. What I need is to limit where the mc can scroll to i.e. so it doesn’t just keep scrolling off the screen.

Code:

stop();
_root.onEnterFrame = function() {
_root.cad_menu_1.cad_menu._x = _root.cad_menu_1.cad_menu._x+(.5*Stage.width-_xmouse)/70;
};

As always help is much appreciated, cheers

http://www.kirupa.com/developer/mx/infinite.htm
http://www.kirupaforum.com/forums/showthread.php?t=55437 post#5

scotty(-:

Cheers dude, much abliged

You’re welcome=)