0 Replies Latest reply on Aug 14, 2006 12:21 PM by Spot3313

    _rotation help needed

    Spot3313
      Hey,

      Im have an object roating back and forth and when I roll over a btn, Im wanting it to spin to its original state. Here is the code if anyone wouldnt mind taking a look that would be ideal! Also Im sorry if its a little messy... Im not the greatest writer yet.

      function btnName() {
      var resetSpin = 10;
      btn.onRollOver = function() {
      globe.onEnterFrame = function() {
      if (this._rotation == 90) {
      resetSpin = -10;
      //this._rotation == 0;
      }
      if (this._rotation == 0) {
      resetSpin = 0;
      }
      this._rotation = this._rotation+resetSpin;
      };
      };
      }
      function globeSpin() {
      var halfSpin = 1;
      globe.onEnterFrame = function() {
      if (this._rotation == 90) {
      halfSpin = -1;
      }
      if (this._rotation == 0) {
      halfSpin = 1;
      }
      this._rotation = this._rotation+halfSpin;
      };
      }
      globeSpin();
      btnName();