【发布时间】:2013-04-09 10:44:08
【问题描述】:
我似乎无法解决这个问题。我想显示一个以数组集合中特定位置开头的列表,而不更改数组。目标是拥有一组用户可以滑动浏览的全屏图像(就像在电子书中一样),对于章节索引,我想从 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>
【问题讨论】:
标签: arrays apache-flex flexbuilder