var menuBarArray:ArrayCollection = new ArrayCollection
({label:resourceManager.getString
> ("RegistrationForm","home"),icon:'Home',click:callDoHome});

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>




On Dec 29, 10:38 am, veeru <[email protected]> wrote:
> This .mxml file try to convert to .as file
>
> <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>

--

You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.


Reply via email to