0 Replies Latest reply on Feb 6, 2008 12:07 PM by rarararadical

    Forward/Backward button function

    rarararadical
      How can I adjust the code below to just have a forward button (displaying the next image) and backward button (displaying the previous image)? Images are in sequence and named image1.gif, image2.gif, image3.gif and so on.

      ________________________________________________

      // About us Button
      but1.onRelease = function() {
      _root.trig.xposnew = -(_root.imagewidth);
      };

      // Products Button
      but2.onRelease = function() {
      _root.trig.xposnew = -((_root.imagewidth)*2);
      };

      // Services Button
      but3.onRelease = function() {
      _root.trig.xposnew = -((_root.imagewidth)*3);
      };

      // Clients Button
      but4.onRelease = function() {
      _root.trig.xposnew = -((_root.imagewidth)*4);
      };

      // Contact Us Button
      but5.onRelease = function() {
      _root.trig.xposnew = -((_root.imagewidth)*5);
      };

      ________________________________________________

      Code used is from this tutorial