-
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?
-
I have this problem too.
Can i have the source of your linked movieclip?
thank you
-
Just right-click on the movieclip. "View source" should be in the menu.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|