0

I'm using a spark ItemRenderer in a list with useVirtualLayout="true" The itemRenderer has an image loaded in it. When the list scrolls, and a new Item is brought into view - the image flickers, briefly showing the previous image in the itemrenderer. When the itemrenderer is re-used, how can I prevent the flicker?

Is there an event when an itemrenderer is discarded? then I could hide the image or load a blank image.

zero323
  • 322,348
  • 103
  • 959
  • 935
stevemcl
  • 367
  • 1
  • 3
  • 11

2 Answers2

1

Try this A simple way to avoid Flickering images is to give a height according to the total images to show example

if the List have vertical layout

myList.height = myList.dataProvider.length;

if the List have horizontal layout

myList.width = myList.dataProvider.length;
Lucas Matos
  • 2,531
  • 2
  • 15
  • 17
0

It depends on how you use the image. I tend to load the image and save its BitmapData ONCE!. Then you can directly use it without any flickering. You just have to inject some sort of ImageRespository into the renderer.

This can easily be done by listing to the rendererAdd event of the DataGroup and stuff the repo into the renderer.

Florian Salihovic
  • 3,921
  • 2
  • 19
  • 26