Search Flex Components Free

Custom Search

December 27, 2007

How to work with Repeaters in Flex

<?xml version=”1.0″?>

<mx:Application xmlns:mx=”“>



import mx.controls.Alert;


private var dp:Array = [1, 2, 3, 4, 5, 6, 7, 8]; // you can add number of elements you want



<mx:Panel title=”Repeater Example” width=”75%” height=”75%” paddingTop=”10″ paddingLeft=”10″ paddingRight=”10″ paddingBottom=”10″>

<mx:Tile direction=”horizontal” borderStyle=”inset” horizontalGap=”10″ verticalGap=”15″ paddingLeft=”10″ paddingTop=”10″ paddingBottom=”10″ paddingRight=”10″>

<mx:Repeater id=”rp” dataProvider=”{dp}”>

<mx:Button height=”49″ width=”50″ label=”{String(rp.currentItem)}” click=” + ‘ pressed')”/>





Related Flex Tutorials