In Flex 3 is there a way to pre-buffer an image so that it appears without flickering?

Posted by Brad Urani on Stack Overflow See other posts from Stack Overflow or by Brad Urani
Published on 2010-03-31T17:24:32Z Indexed on 2010/03/31 19:53 UTC
Read the original article Hit count: 358

Filed under:
|

In my application I have an VBox control on top of another VBox that contains an Image control that loads a jpg from a URL (you can't see the bottom panel initially since it's underneath, but the image does fully download). When one clicks on the top VBox, the bottom one gets set to visible=false, then an effect causes the top VBox to vanish, then the bottom VBox is set to visible=true and an effect causes it to appear. Continuously clicking the VBoxes causes them to alternate appearing and disappearing. The problem is that the first time the bottom VBox appears, it flickers once when it draws. After that, there's no problem and it smoothly appears and disappears with the effect with no problem. It's as if the first time the bottom VBox appears, it flickers because even though the image has been downloaded, it has never been displayed before. Can I pre-buffer the image in the bottom VBox somehow to avoid this flicker?

© Stack Overflow or respective owner

Related posts about flex

Related posts about image