Issue with using SWF files within TileList control
I ran into a small annoyance using SWF files within the Flex TileList control. Using a SWF image in the itemRenderer seems to block the broadcasting a double-click ListEvent, however using a image format (JPG, PNG, GIF) works fine. To demonstrate the issue I created a very simple example:
[as]
[/as]
In the example above we have two items in the list, one uses a jpeg image, the other uses a swf file. I have set the doubleClickEnabled propertie to true and listen for the doubleClick event. Double-clicking the jpeg image files and alert message. Doing the same on the swf image does not fire the event.
The solution I derived for getting the the event to fire was to create a “cover” on top of the SWF image. I used a Canvas with a transparent border and fill color. This seems to proprogate the double-click event:
List ItemRenderer:
[as]
[/as]
Application MXML:
[as]
[/as]
This is the best solution and simplest I have come up with so far. I will post the example and see if anyone else might have a bette workaround.
-Mr