Using an XMLList component to configure menu data
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:XMLList id="myMenuData"> <menuitem label="File"> <submenu label="New" /> <submenu label="Open" /> </menuitem> <menuitem label="Edit"> <submenu label="Cut" /> <submenu label="Paste" /> <submenu label="Copy" /> </menuitem> </mx:XMLList> </mx:Application>