[CS4]Limit an object's movement

Hi,
I’ve made a sort of sliding menu in Flash (CS4) which is basically a movie clip that has a function assigned to it that if the cursor goes over a button it starts moving in a direction.

Code:
_root.right.onRollOver = function() {
goRight = true;

};
if (goRight) {
_root.content._x -= 10;
}
Now, I don’t want that “content” object to slide all the way out of the screen. How can I make it stop at certain position, say x=770? Or is there any better way?