1 Reply Latest reply on Jun 7, 2006 8:40 AM by beesOnTarmac

    ScrollPane - scrolling headache - need asprin

    beesOnTarmac Level 1
      I'm loading a library item into a scrollpane. So far so good, the content is all there and I can use the slider and the arrows to move the content up and down. BUT if I use the slider to go down a bit and then go back to the top with the up arrow the very top of the content is cut off. No matter how much I click the up arrow it just stops there. If I then nudge the slider again it takes up the final little bit.
      Can anyone help?
        • 1. Re: ScrollPane - scrolling headache - need asprin
          beesOnTarmac Level 1
          Ok I've been playing around some more and I think I've fixed it, but I'm not sure why it works. I used a listener to see if the arrow thought it was taking the content to zero. It did even though it was obvious from the screen it wasn't at zero. Anyway I tried an odd if statement - if it's at 0 set it to 0 (see below) and bizarrely enough it works now. Would still like to know if I've done something stupid or if this is a genuine bug.

          var spListener bject = new Object();
          spListener.scroll = function(evt_obj bject):Void
          trace("vPosition = " + scrollMenu.vPosition);
          if (scrollMenu.vPosition == 0)
          scrollMenu.vPosition = 0;
          // Add listener.
          scrollMenu.addEventListener("scroll", spListener);