1 Reply Latest reply on Aug 16, 2006 6:28 AM by purple_am

    Interactive image panning

    purple_am
      ello guys

      I need some help with creating a panning image system as in this example

      Its something simple i suppose but cant manage to figure out the scripts.

      Any tutorial or script is most welcome.

      thx in advance
        • 1. Re: Interactive image panning
          purple_am Level 1
          onClipEvent (load) {
          Xwidth = _root.mc._width;
          for (i=1; i<4; i++) {
          img.duplicateMovieClip("img"+i, i);
          }
          }
          onClipEvent (enterFrame) {
          if (hitTest(_root._xmouse, _root._ymouse, false)) {
          Xpos = _root.mc.img1._x;
          k = Xpos-(_root.mc._xmouse/20);
          _root.mc.img1._x = k;
          _root.mc.img2._x = k+Xwidth;
          _root.mc.img3._x = k-Xwidth;
          if ((Xpos<(-Xwidth)) or (Xpos>Xwidth)) {
          _root.mc.img1._x = 0;
          _root.mc.img2._x = Xwidth;
          _root.mc.img3._x = -Xwidth;
          }
          }
          }

          Ok i found this script from a post of Urami ... i tried to modify it so as not to have a 360 VR but only 180.

          Well its aint working out good. LINK

          Modification to the original code.
          ////////////////////////////////////////////////////////////////////////////////////////// //////
          onClipEvent (load) {
          Xwidth = _root.mc._width;
          }
          onClipEvent (enterFrame) {
          if (hitTest(_root._xmouse, _root._ymouse, false)) {
          Xpos = _root.mc.img._x;
          k = Xpos-(_root.mc._xmouse/20);
          _root.mc.img._x = k;
          }
          }
          ////////////////////////////////////////////////////////////////////////////////////////// //////

          Anyone can help me out of this.