Constraining mouse trail

I got this mouse trail effect from one of the tutorials and I would like to be able to constrain it to specified perimeters. I couldn’t figure it out im too noob with action scripting "=/ but heres my code(I changed it a bit)…flash mx pro btw…

menu_drag.onEnterFrame = function() {
var xMouse = _root._xmouse;
if(Math.abs(xMouse - this._x) < 1) {
this._x = xMouse;
} else {
this._x -= (this._x-xMouse) / 1000;
}
}

so just incase you didn’t get what im trying to do…I dont want the menu_drag to go past a certain point on the x axis… plz help me :slight_smile: thanks