mc.onPress=function(){ var x=this._xmouse(); var dx=3; this.onEnterFrame=function(){ this._x+=this._xmouse-x+dx; x=this._xmouse; } } mc.onRelease=mc.onReleaseOutside=function(){ delete this.onEnterFrame; }