A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Scrollrect vs. Mask: Smooth movement

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    90

    Unhappy Scrollrect vs. Mask: Smooth movement

    There are two basic ways of panning a view in Flash. One is to move the display object (and use a mask if necessary). The other is to use scrollrect.

    Today I noticed a small, but annoying effect of scrollrect. Scrollrect's can't have true Numeric positions-- they are automatically snapped to the nearest pixel.

    When moving at very slow speeds, the effect is noticeable. In this example you can switch between two modes of panning, sprite movement with mask and scrollrect:

    http://lab.wx3.com/scrolltest/ (view source enabled).

    In the default mode, the circles move smoothly.

    In scrollrect mode, the circles seem to stutter because the scrollrect is snapping to the nearest pixel.

    Has anyone else encountered this and found a way to make a scrollrect move smoothly at slow speeds?

  2. #2
    Junior Member
    Join Date
    Nov 2008
    Posts
    3
    I have this problem too.

    Can i have the source of your linked movieclip?

    thank you

  3. #3
    Member
    Join Date
    Jan 2009
    Posts
    90
    Just right-click on the movieclip. "View source" should be in the menu.

  4. #4
    Junior Member
    Join Date
    Nov 2008
    Posts
    3
    Thank you very much.

    Very nice code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center