2 Replies Latest reply on Aug 12, 2011 3:37 AM by daslicht

    Smooth Scrolling Content

    daslicht Level 2


      I like to create smooth scrolling text which snaps to the page heights.


      The following example shows my approach.

      At the moment scrolling anmation is working only good when dragging the scrollbar.


      Since the Mousewheel is only working when the Scrollbar have a ViewPort as property I have tried to implement it myself.

      But its working less good:)


      Anyone like to help me and show me a more smarter solution?


      Here is my approach (view source enabled)


        • 1. Re: Smooth Scrolling Content
          daslicht Level 2

          Ok second approch :



          It is workling quite good now

          • 2. Re: Smooth Scrolling Content
            daslicht Level 2

            I have just found this in the documentation:






            Language Version: ActionScript 3.0
            Product Version: Flex 4
            Runtime Versions: Flash Player 10, AIR 1.5



            The viewport controlled by this scrollbar.           If a viewport is specified, then changes to its actual size, content       size, and scroll position cause the corresponding ScrollBarBase methods to      run:

            • viewportResizeHandler()
            • contentWidthChangeHandler()
            • contentHeightChangeHandler()
            • viewportVerticalScrollPositionChangeHandler()
            • viewportHorizontalScrollPositionChangeHandler()

            The VScrollBar and HScrollBar classes override these methods to       keep their pageSize, maximum, and value properties in sync with the      viewport. Similarly, they override their changeValueByPage() and changeValueByStep() methods to      use the viewport's scrollPositionDelta methods to compute page and      and step offsets.


            The default value is null.

            Anyone like to help me to implement the the Animated Scrolling direct into a Custom Group using the viewportVerticalScrollPositionChangeHandler(), please?
            This should work, no?