Repeater based on Array
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
[Bindable]
public var myArray:Array=[1, 2, 3, 4, 5, 6];
</mx:Script>
<mx:ArrayCollection id="myAC" source="{myArray}"/>
<mx:Repeater id="myrep" dataProvider="{myAC}" count="6">
<mx:Label id="Label1" text="Value: {myrep.currentItem}, Loop {myrep.currentIndex+1} of {myrep.count}"/>
</mx:Repeater>
<mx:HRule/>
<mx:Repeater id="myrep2" dataProvider="{myAC}" count="4" startingIndex="1">
<mx:Label id="Label2" text="Value: {myrep2.currentItem},Loop {myrep2.currentIndex-myrep2.startingIndex+1} of {myrep2.count}"/>
</mx:Repeater>
</mx:Application>
Related examples in the same category