flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jude <flexcapaci...@gmail.com>
Subject Re: Scroller update performance
Date Wed, 18 Dec 2013 19:42:03 GMT
I was looking into this a few days ago. I was comparing the scrolling in
Flex container scrolling in a page in the browser. The browsers scrolling
was much smoother and faster (for me - Firefox, Mac). I found an example
online to increase the page scroll size and it's an improvement but it's
not as smooth:

    protected function
scrollerInstance_creationCompleteHandler(event:FlexEvent):void {
           scrollerInstance.addEventListener(MouseEvent.MOUSE_WHEEL,
scroller_mouseWheel, true);
    }

    protected function scroller_mouseWheel(e:MouseEvent):void {
        e.preventDefault();
        e.stopImmediatePropagation();
        scrollerInstance.viewport.verticalScrollPosition  -= e.delta * 10;
    }


I realized the Scroller class already has smooth scrolling support as of
Flex 4.5 on mobile but it's disabled on the desktop. You can enable it on
desktop by setting the interaction mode to touch but it has a few major
issues.

• the Scroller UI is invisible until it's used and then it fades out the UI
components (track and thumb buttons)
• it interferes with normal mouse interactions (adds dragging the screen on
mouse down and mouse move like the hand cursor in Acrobat)
• it ignores common mouse interactions (mouse wheel scrolling).
• it reverses the scroll direction

This might be something we can enable in the Scroller class through a
property such as "enableSmoothScrolling" but it would require some work to
work on desktop.


On Wed, Dec 18, 2013 at 11:10 AM, mark goldin <markzolotoy@gmail.com> wrote:

> I have a screen with a number of TileGroups positioned vetically. Each
> TileGroup has a number of controls too. Yes, this screen is very busy. All
> these Tilegroups are placed inside of Scroller in order to scroll the
> screen. I am listening to updateComplete on the Scroller. I see that it
> takes time before I get into the listener. What kind of recommendations
> anyone has to improve scroller's performance?
>
> Thanks
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message