0 Replies Latest reply on Nov 23, 2009 6:25 PM by bernielove1

    360 degree panorama

    bernielove1

      Hello,

       

        I have a flash project that I can pan back and forth with my mouseover.  How can I change the code to loop back seamlessly to the other end creating a 360 degree turn?  Also is there a way i can use my wheel to zoom into a portion of the stage?  I'm using AS2 for this.

       

      Here is the code that I am using;

       

      this.onMouseMove = function() {
      constrainedMove(bg_mc, 4, 1);
      };
      function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
      var mousePercent:Number = _xmouse/Stage.width;
      var mSpeed:Number;
      if (dir == 2) {
      mSpeed = 1-mousePercent;
      } else {
      mSpeed = mousePercent;
      }
      target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
      target.onEnterFrame = function() {
      if (target._x == target.destX) {
      delete target.onEnterFrame;
      } else {
      target._x += Math.ceil((target.destX-target._x)*(speed/100));
      }
      };
      }

       

      Thank you so much for your help,

       

          Bernie