This is my code .
I using cache images to help me show image faster .
When i use List or Datagroup then cache image method is ok . but i can't handle swipe event to display one image at a time
If I use navigator.pushview(MyAppHomeView) then i can handle swipe event, but i can't using cache image ;
So please give me some solution . Thank you
===========Myapp.MXML file===============
="1.0"="utf-8"
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.MyAppHomeView" applicationDPI="240"
splashScreenImage="@Embed('Images/Sflash.jpg')" >
<fx:Declarations>
</fx:Declarations>
<fx:Script>
<![CDATA[
</fx:Script>
</s:ViewNavigatorApplication>
=======================MyAppHomeView.MXML==============
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
creationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:ContentCache id="ldr" enableQueueing="true"
maxActiveRequests="1" maxCacheEntries="2"/>
</fx:Declarations>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|Image {
enableLoadingState: true;
}
</fx:Style>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
import mx.core.FlexGlobals;
public function init():void
{
var rand:String = new Date().time.toString()
var arrcaching:Array = [];
myListX.dataProvider = FlexGlobals.topLevelApplication.tempAc;
}
]]>
</fx:Script>
<s:Label id="abc" text="abc"/>
<s:List id="myListX" width="1142" height="1350"
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" >
<s:layout>
<s:TileLayout id="myListX_tiles"
requestedRowCount="1"
horizontalGap="0"
verticalGap="0" horizontalAlign="center" verticalAlign="middle" />
</s:layout>
<s:itemRenderer>
<fx:Component>
<s:DataRenderer>
<s:Image source="{data}" height="60%" width="60%" />
</s:DataRenderer>
</fx:Component>
</s:itemRenderer>
</s:List>
</s:View>