onClipEvent (load) { Mouse.hide(); //Initialize your variables at the top so that //you can change the behaviors conveniently. rotationSpeed = 20; rotationPercent = 0.97; }//onClipEvent (load) onClipEvent (enterFrame) { //Note that enterFrame is bound to frame-rate. //(Demo this at 30fps vs. 8fps) this._x = _root._xmouse; this._y = _root._ymouse; //Pendulum dx = this._x - d1; dr = this._rotation/30 + (dr * rotationPercent) - dx/rotationSpeed; this._rotation -= dr; d1 = this._x; }//onClipEvent (enterFrame)