I am working on a couple AIR apps that would best be served with a menu bar.
Problem is, as where I do understand how to make menu items, I cannot figure
out how to trigger a function or switch a viewstack when a menu item is
clicked.
Lets say I have this:
<mx:MenuBar x="0" y="80" width="100%" id="mainMB" click="menuHandler(event)"
labelField="@label">
<mx:XMLList>
<menuitem label="Practice Tests">
<menuitem label="Load Test" data="load"/>
<menuitem label="End Test" data="cancel"/>
</menuitem>
</mx:XMLList>
</mx:MenuBar>
I want to trigger a function when either the load or cancel is selected. How?