Components Flex


    
    
        
            import mx.collections.ArrayCollection;
            import mx.events.FlexEvent;
            [Bindable]
            private var menu_dp:ArrayCollection;
            private function initApp(evt:FlexEvent):void {
                var temp:Array = new Array();
                var subNodes:ArrayCollection = new ArrayCollection( [ {label:"New"},
                                                                      {label:"Open"},
                                                                      {label:"Close",enabled:false}
                                                                    ]);
                temp.push({label:"File",children:subNodes});
                temp.push({label:"Source"});
                subNodes = new ArrayCollection( [   {label:"50%", type:"radio", groupName:"one"},
                                                    {label:"100%", type:"radio", groupName:"one",selected:true},
                                                    {label:"150%", type:"radio", groupName:"one"}
                                                ]);
                temp.push({label:"View",children:subNodes});
                menu_dp = new ArrayCollection(temp);
            }