Reversing Voets Golden Rule

Heres my scenario, I have a menu bar that is off stage with just a little part showing. I want to be able to rollover the part showing so the whole menu eases into the stage. I have this done, however, i would like it so that when I roll off the menu bar it will ease back out.Im just unsure of how to go about this. Ill post what I have, in the meantime I’ll still keep trying to tweek the code. But if any help is possible it’d be great.


MovieClip.prototype.easeX = function(to){
        this.onEnterFrame = function(){
                this._x = to-(to-this._x)/1.1;
                if(this._x > to-1 && this._x < to+1){
                        delete this.onEnterFrame
                        //do other stuff here, this is the point at which the object reaches its target
                }
        }
}
_root.menu.onRollOver = function(){
	_root.menu.easeX(200);
}