var xmlMenuItem:XML = xml..menuItem.(attribute("label") == "Do
Something")[0];Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Marty Pitt Sent: Monday, June 02, 2008 6:11 AM To: [email protected] Subject: [flexcoders] Accessing the sub-items of a Menu command Hi all. This is a stupid question, but I can't work it out! Given the following XML and code, how am I supposed to access the "Do Something" menu item that is created? var xml:XML = new XML( <root> <menuItem label="File"> <menuItem label="Do Something" /> </menuItem> </root> ); var menuBar:MenuBar = new MenuBar(); menuBar.dataProvider = xml; menuBar.showRoot = false; menuBar.labelField = "@label" By making a call to menuBar.getMenuAt(0) I get a reference to the "File" menu, returned as type Menu. Menu doesn't seem to expose either a collection of sub-items, or a getMenuAt() method. I'm stumped! Any help greatly appreciated. Cheers Marty

