Mega Code Archive

 
Categories / Flex / Components
 

Use Repeater component to create Labels

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">     <mx:Script>          [Bindable]     public var myArray:Array=[1,2,3,4];        </mx:Script>     <mx:ArrayCollection id="myAC" source="{myArray}"/>     <mx:Repeater id="myrep" dataProvider="{myAC}">        <mx:Label id="Label1" text="This is loop #{myrep.currentItem}"/>     </mx:Repeater> </mx:Application>