I'm facing a typical problem . Tile list getting data from array collection which are SWF images.
When user click on image it doesn't go to the itemDoubleClick(event) handler. But If user click on white space near Image, Control goes inside itemDoubleClick(event) handler.
If i use itemClick(event) , then it is working fine.
Expected Result: When User double click on image it should load on different layout.
Code Demo is Mxml Part is :->
<mx:TileList id="imgView"
columnCount="3"
width="100%"
height="292"
styleName="tilelistContainer"
dataProvider="{imageArr}"
itemRenderer="com.Images"
itemDoubleClick="{imageGalleryClickHandler(event)}"
doubleClickEnabled="true"
dragEnabled="true"
/>
ActionScript Code is :->
public function imageGalleryClickHandler(evnt:ListEvent):void
{
Alert.Show("Control is in double click handler"):
}
I'm fed of this, please help.
As per your Comment, I'm updating the Code of ItemRenderer. Please check this.
Updated Code
<utils:LoadingImage source="{data.value}"
width="100%"
verticalAlign="middle"
horizontalAlign="center"
height="100%"
maintainAspectRatio="true"
doubleClickEnabled="true"
scaleContent="true"
/>
This link might explain what is going on - not a solution but what might be causing it:
Flex tilelist itemrender instance not match the dataprovider length
This link explaining about possibly using ITEMCLICK might help:
http://andymatthews.net/read/2009/09/20/Beginning-Flex:-TileList-using-the-itemClick-vs-click-events