List component that displays icons specified in the data
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var myData:ArrayCollection = new ArrayCollection([
{label:"A", icon:"imgYellow"},
{label:"B", icon:"imgRed"}]);
[Bindable]
[Embed(source="logo.jpg")]
public var imgYellow:Class;
[Bindable]
[Embed(source="logo.jpg")]
public var imgRed:Class;
</mx:Script>
<mx:List labelField="label" iconField="icon" dataProvider="{myData}" height="50"/>
</mx:Application>
Related examples in the same category