I am
working on migrating an app to f2b3, and I have run into a issue
that I cant figure out. I have also tested this with the example code
provided on the adobe flexapps site.
When I run the code below, it displays only the children of the Contacts
xml, and doesnt display anything else. Anyone have an idea why it is
doing this.
Here is my code.
menuBar.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initCollections()" width="100%"
height="100%">
<mx:Script source="as/asMenuBar.as" />
<mx:MenuBar labelField="@label" showRoot="false"
dataProvider="{menuBarCollection}" width="100%"
height="22" />
</mx:Canvas>
asMenuBar.as
// IMPORTS
import mx.events.MenuEvent;
import mx.collections.*;
[Bindable]
public var menuBarCollection:XMLListCollection;
private var menubarXML:XMLList =
<>
<menuitem label="Contacts">
<menuitem label="Outside Agent" data="">
<menuitem label="Vendor" data="">
<menuitem label="Clients" data="">
</menuitem>
<menuitem label="Search">
<menuitem label="Listings" data="">
<menuitem label="Sales" data="">
<menuitem label="Rentals" data="">
<menuitem label="Referrals" data="">
</menuitem>
</>;
private function initCollections() : void
{
menuBarCollection = new XMLListCollection(menubarXML);
}