Use an Array of Objects to specify a label and icon for each button : Array « Data Model « Flex
- Flex
- Data Model
- Array
Use an Array of Objects to specify a label and icon for each button

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:ButtonBar horizontalGap="5">
<mx:dataProvider>
<mx:Object label="Flash" icon="@Embed(source='logo.jpg')"/>
<mx:Object label="Director" icon="@Embed(source='logo.jpg')"/>
<mx:Object label="Dreamweaver" icon="@Embed(source='logo.jpg')"/>
<mx:Object label="ColdFusion" icon="@Embed(source='logo.jpg')"/>
</mx:dataProvider>
</mx:ButtonBar>
</mx:Application>
Related examples in the same category