Ah, no I looked at the history and that was a different thread, probably confused others as well.
Ok, try this: var xmlMenuItem:XML = myMenuData..menuItem.(attribute("id")=="menuDown")[0]; [EMAIL PROTECTED] = false; Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bc24fl Sent: Tuesday, June 03, 2008 9:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Enable / Disable Flex Menu Items Programmatically using AS 3.0 I'm really struggling for help. We have done everything to try and get a solution to this problem including: 1. Posting on public forums / mailing lists 2. Purchased books on AS3 and Flex 3. Signed up for a year subscription to Lynda.com 4. Purchased support from experts-exchange.com 5. Purchased support directly from Adobe where supposedly it's 3 day response (no resolution) and we have received no response for a week (business days). What in the world am I doing wrong? This question doesn't appear to be rocket science as I've done this (enable/disable menu items) in many other programming languages. As you can see I have exhausted every (that I know of) resource. What else am I to do? My employer is upset and now considering dropping the language altogether and I don't want that. Any advice would BE MUCH APPRECIATED. End rant. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "bc24fl" <[EMAIL PROTECTED]> wrote: > > I have the following XML data defined in my app: > > ========= > <!-- Define the menu data. --> > <mx:XML format="e4x" id="myMenuData"> > <root> > <menuitem id="menuDrill" label="Drill =>" > > <menuitem id="menuDown" label="Down" toggled="false" > enabled="true"/> > <menuitem id="menuUp" label="Up" toggled="false" > enabled="true"/> > </menuitem> > <menuitem type="separator"/> > <menuitem label="Lock / Unlock" type="check" toggled="false"/> > <menuitem type="separator"/> > <menuitem label="Reset Graph" toggled="false"/> > </root> > </mx:XML> > =========== > > I can statically disable one of the items by setting enabled="false", > however I need to disable the item by using Action Script 3.0. > > I've tried using dataDescriptor like so but it does not work: > > =========== > myMenu.dataDescriptor.setEnabled(myMenuData.menuDrill.menuDown,false); > =========== > > I've posted this on a few forums and haven't received a solution. I > hope I can find one here. > > Any help would be much appreciated. > > Thanks. >