I want to restrict the movement of my movieclip. For example, I only want it to move 100 pixels to the right and left. Can anyone offer suggestions?
class Drag extends MovieClip {
var ease;
var dx:Number;
private function Drag() {
this.ease = 0.3;
};
private function onEnterFrame():Void{
this.dx = _xmouse - this._x - 500;
this._x += (this.dx * this.ease);
}
}
The source files: