Flex 3快速入门(14): 构建高级用户界面 使用 Repeater 组件
?
??????????? label="<mx:Application>
???? <mx:Script>
??????? <![CDATA[
??????????? [Bindable]
??????????? public var myArray:Array=[1,2,3,4];
??????? ]]>
??? </mx:Script>
???
??? <mx:Panel
??????? title="Repeater: emulating a for loop"
??????? paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"
??? >
???????
??????? <mx:Repeater id="myRep" dataProvider="{myArray}">
??????????? <mx:Label
??????????????? id="myLabel"
??????????????? text="This is loop #{myRep.currentIndex}"
??????????? />
??????? </mx:Repeater>
??
??? </mx:Panel>
</mx:Application>
?
提示:重构数组声明
public var myArray:Array=[,,,,]; // The actual values do not matter in this use-case
结果
??翻页 :