import mx.controls.Menu;
private function buildDisplay():void {
var testMenu:Menu = Menu.createMenu(null, menuDataProvider, true);
testMenu.show(20, 20);
}
[Bindable]
public var menuDataProvider:Array = [
{label: "File", children: [
{label: "Save", enabled: false},
{label: "Open", type: "normal"}]},
{label: "Type", children: [
{label: "Text", type: "radio",groupName: "group1"},
{label: "Image", type: "radio",groupName: "group1", toggled: true},
{label: "XML", type: "radio",groupName: "group1"}]},
{label: "Save As", type: "check", toggled: true},
{label: "Doc", type: "check", toggled: false}
];