0 Replies Latest reply on Dec 7, 2010 6:53 PM by Chris McLaughlin

    Synchronizng Scrollers

    Chris McLaughlin Level 1

      Hi,

       

      I have two scroll panes that I wish to synchronize.  I added listeners to each for the scroll event and called the following function:

       

      function scrollListener(event:ScrollEvent):void {
            if(event.target.name == "xSP") {
                  ySP.verticalScrollPosition = xSP.verticalScrollPosition
            } else {
                  xSP.verticalScrollPosition = ySP.verticalScrollPosition
            }
       
      };

       

      The problem is that the positions do not match up exactly.  For example if I scroll vertically to the bottom of one of the scroll panes, the other sroll pane falls a bit short of the bottom.

       

      Any ideas would be greatly appreciated.

       

      Best regards,

       

       

      Chris McLaughlin