Hi All, I'm trying to create a right click menu in Flex that needs to be dynamically generated based on certain device statuses. I'd prefer the menu to be created as XML as I already have functions written to traverse the XML in a menu.
My attempt at getting the menu to work is below. Basically all I want is a top level menu "Add", with sub nodes "Interfaces" and "Devices" which I'll then further populate based on the system state. Thanks a lot for any help, Fred var xlc:XMLListCollection = new XMLListCollection(); var a:XML = <menuitem label="Add"/> var b:XML = <menuitem label="Interfaces"/> var c:XML = <menuitem label="Devices"/> a.appendChild(b); a.appendChild(c); xlc.addItem(a); menu = Menu.createMenu(this, xlc, false); menu.labelField = "label"; menu.addEventListener(MenuEvent.CHANGE, addPointMenuHandler); menu.show(event.stageX, event.stageY);