You need to make use of conditional code that checks the current x property to see if moving further will vilate the limit and if so you skip the movement.
In your right movement code it would be something like...
if(movieclip.x + stepsize < right_side_limit){
movieclip.x += stepsize;
} else {
// do nothing (or something else )
}
Similar code would be used in the left direction movement code.