Ok so I have a movie clip that scrolls down and up when you roll over the up and down buttons exactly 200px every time. this is my code:
MovieClip.prototype.moveDir = function(Xdistance:Number, Ydistance:Number, ease:Number) {
delete this.onEnterFrame;
Ydistance ? this.newY=(this._y-Ydistance) : null;
Xdistance ? this.newX=(this._x-Xdistance) : null;
this.onEnterFrame = function() {
Ydistance ? this._y -= Math.round((this._y-this.newY)/ease) : null;
Xdistance ? this._x -= Math.round((this._x-this.newX)/ease) : null;
};
};
r.onRollOver=function () {
menu.moveDir(200, 0, 5);
}, l.onRollOver=function () {
menu.moveDir(-200, 0, 5);
};
but how do I get it to not take effect when the movie clip ends? thanks for any help