0 Replies Latest reply on Apr 17, 2007 9:01 AM by wrtdesign

    modifying scroll bar

    wrtdesign
      Hello,

      Our website already has a scroll bar where you click a box and drag it up and down. Many people don't like it so we decided to add up and down arrows. Below is part of the current actionscript:

      myVars_lv.load(txt_url);

      scroller_mc.onEnterFrame = function() {
      current=((this._y - initialY)/scrollLength*maxScroll);
      news_txt.scroll = current+1;
      }
      scroller_mc.onPress = function() { this.startDrag(false, initialX ,initialY, initialX, endY); }
      scroller_mc.onRelease = function() { stopDrag(); }
      scroller_mc.onReleaseOutside = function() { stopDrag(); }

      To add an up arrow, is this the proper approach?

      up_mc.onEnterFrame = function() {
      current=((this._y - initialY)/scrollLength*maxScroll);
      news_txt.scroll = current+1;
      }
      up_mc.onPress = function() { this.startScroll(false, initialX ,initialY, initialX, endY); }
      up_mc.onRelease = function() { stopScroll(); }

      I know startScroll isn't valid - what should it be?

      Thank you in advance.