I am loading a large number (50 - 500) of swf files into a viewer that scrolls them horizontally. Each of the swf files is loaded into a container (internally it is Hbox(Canvas(SWF))
, and this is done to allow overlays on top of the swf (which works fine)).
Each of these containers is then loaded into an Hbox, and then that hbox is set inside of a scrolled Canvas (again for some absolutely positioned elements). For performance, the swf containers that are not visible are set to hidden. The canvas is also setup to scroll via mouse dragging.
Everything works fine most of the time, however, when the list is scrolled very fast, some of the swf files seem to tear (always a vertical tear) and the torn portion becomes transparent. Additional scrolling will mutate the tear, but never fix it. The problem goes away immediately if any of the container elements are re-sized, or if the user zooms in at all.
Inside the scroll event handler, I have tried every invalidate / validate permutation that I could think of to no avail. (including nuke it from orbit approaches such as application.invalidateDisplayList(); application.validateNow()
)
I imagine that there is some sort of additional event being sent when the user re-sizes the application that isn't being sent (or being ignored) when the tears happen while scrolling.
Has anyone encountered this type of behavior before? Is there some magic bullet sequence of invalidating and validating that will fix the problem?
In addition, it seems that the problem is much easier to reproduce in Firefox than it is in safari, but both browsers will show the tearing given enough fast scrolling.