<mx:ArrayCollection id="menuBarArray" >
<mx:Object label='{resourceManager.getString
("RegistrationForm","home")}' icon='Home' click="doHome(event)"/>
<mx:Object label='{resourceManager.getString
("RegistrationForm","logout")}' icon='Logout' click="doLogout(event)"/
>
</mx:ArrayCollection>
here's the code
----------------------------------
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="487">
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
import mx.controls.Alert;
import mx.controls.ComboBox;
import mx.collections.ArrayCollection;
[Bindable]
private var ac:ArrayCollection = new ArrayCollection
([{label:'Hall',data:callFn},{label:'Room',data:'R'}]);
var menuBarArray:ArrayCollection = new ArrayCollection
({label:resourceManager.getString
("RegistrationForm","home"),icon:'Home',click:callFn});
private function callFn():void
{
Alert.show("callFn Called");
}
private function comboChange(event:ListEvent):void
{
var fn:Function = ComboBox(event.currentTarget).selectedItem.data
as Function;
fn();
}
]]>
</mx:Script>
<mx:ComboBox dataProvider="{menuBarArray}" change="comboChange
(event)"/>
</mx:Application>