1 Reply Latest reply on Jul 20, 2008 12:35 AM by Noelbaland

    custom scroller problems

    redsox05 Level 1
      I'm having trouble with a custom scroller. I want it to go left to right and NOT up and down as it currently does. I thought I could just switch the x and y coordinates and letters and it would work but it still scrolls upand down. Thanks for any help.

      stop();
      var scrollLeft:Number = 107.5;
      var scrollRight:Number = 666.8;

      var imageLeft:Number = 23;
      var imageRight:Number = -639;

      var scrollRange:Number = scrollRight - scrollLeft;
      var imageRange:Number = imageRight - imageLeft;

      function scroll() {
      var moved:Number = scroller._y - scrollLeft;
      var pctMoved:Number = moved/scrollRange;
      var imageMove:Number = pctMoved*imageRange;
      images._y = imageRight - imageMove;
      }

      scroller.onPress = function() {
      this.startDrag(false,this._x,scrollLeft,this._x,scrollRight);
      this.onMouseMove = scroll;
      }

      scroller.onRelease = scroller.onReleaseOutside = function() {
      this.stopDrag();
      }