我似乎无法解决这个问题。我想显示一个列表,以arraycollection中的特定位置开始,而不更改数组。我们的目标是拥有一组用户可以滑过的全屏图像(就像在电子书中一样),而对于我希望从arraycollection中的特定索引号开始的章节索引。从arraycollection回溯特定索引
是否有一种简单的方法来告诉Itemrenderer从arraycollection中的特定索引号开始。
我的代码,开始于指数0:
<s:List id="pagedList"
width="100%" height="100%"
verticalScrollPolicy="off" horizontalScrollPolicy="on"
pageScrollingEnabled="true">
<s:layout>
<s:TileLayout orientation="rows" requestedRowCount="1"
columnWidth="{pagedList.width}" rowHeight="{pagedList.height}"
verticalGap="0" horizontalGap="0"/>
</s:layout>
<s:ArrayCollection id="contentData">
<s:Image source="assets/cover.jpg"/>
<s:Image source="assets/introduction.jpg"/>
<s:Image source="assets/H1/40_days.jpg"/>
</s:ArrayCollection>
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:Group>
<s:Image source="{data.source}" horizontalAlign="center"/>
</s:Group>
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:List>
如果我没有记错的话,你的方法还是会给予特定图像全自动的索引为0,因此,如果一个按钮将别人的书的最后一页,人的其他页面会后那。 – user1482027 2013-04-09 13:34:53
我开始认为yoyr方法是正确的,但我似乎无法使其工作。你能指点我一些示例代码吗?这将不胜感激。 – user1482027 2013-04-11 12:38:50