xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
// Import the Menu control.
import mx.controls.Menu;
[Bindable]
[Embed(source="a.jpg")]
public var myTopIcon:Class;
[Bindable]
[Embed(source="a.jpg")]
public var myRadioIcon:Class;
[Bindable]
[Embed(source="a.gif")]
public var myCheckIcon:Class;
// Create and display the Menu control.
private function createAndShow():void {
var myMenu:Menu = Menu.createMenu(null, myMenuData, false);
myMenu.labelField="@label";
// Specify the check icon.
myMenu.setStyle('checkIcon', myCheckIcon);
// Specify the radio button icon.
myMenu.setStyle('radioIcon', myRadioIcon);
// Specify the icon for the topmenu items.
myMenu.iconField="@icon";
myMenu.show(10, 10);
}
icon="myTopIcon" />
toggled="true" />