Define XML or XMLList object as a direct child of the
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:MenuBar id="myMenuBar" labelField="@label">
<mx:XMLList>
<menuitem label="MenuItem A">
<menuitem label="SubMenuItem A-1" enabled="False" />
<menuitem label="SubMenuItem A-2" />
<menuitem label="SubMenuItem A-3" />
<menuitem label="SubMenuItem A-4" />
<menuitem label="SubMenuItem A-5" />
<menuitem label="SubMenuItem A-6" />
<menuitem label="SubMenuItem A-7" />
<menuitem label="SubMenuItem A-8" />
<menuitem label="SubMenuItem A-9" />
<menuitem label="SubMenuItem A-10" />
</menuitem>
<menuitem label="MenuItem B" type="check" selected="true" />
<menuitem label="MenuItem C" type="check" selected="false" />
<menuitem label="MenuItem D">
<menuitem label="SubMenuItem D-1" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-2" type="radio" groupName="one" selected="true" />
<menuitem label="SubMenuItem D-3" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-4" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-5" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-6" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-7" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-8" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-9" type="radio" groupName="one" />
<menuitem label="SubMenuItem D-10" type="radio" groupName="one" />
</menuitem>
</mx:XMLList>
</mx:MenuBar>
</mx:Application>
Related examples in the same category