I am trying to take the "value" field from the array, and use it in 
an itemRender to set the color of a button in the itemRender. What is 
the correct syntax for this?

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
        <mx:Script>
                <![CDATA[
                private var categories:Array = new Array(
                  {name: "Sam", value: "0x009DFF"},
                  {name: "Ryan", value: "0x0000FF"},
                  {name: "Julie", value: "0x008000"},
                  {name: "Chris", value: "0x00FF00"},
                ]]>
        </mx:Script>
<mx:List width="594" height="250" dataProvider="{categories}">
  <mx:itemRenderer>
        <mx:Component>
         <mx:Button label="{data.name}" fillColors="{data.value}"/>
        </mx:Component>
   </mx:itemRenderer>   
</mx:List>
</mx:Application>

Reply via email to