1 Reply Latest reply on Aug 4, 2010 11:31 AM by smagfx2

    Best way to get node from XMLListCollection (MenuBar related)

    Aron manager



      I'm building a menu bar from xml this way:


      var menuBarXML:XMLList =
           <menuitem label="Archivo" data="File">
           <menuitem label="Salir" data="Exit" />
           <menuitem label="Gestión ejercicios" data="ExercisesManagement">
                <menuitem label="Abrir ejercicio" data="OpenExercise" />
             <menuitem label="Cerrar ejercicio" data="CloseEjercicio" enabled="false"/>
                <menuitem label="Modificar notas del ejercicio" data="ModifyExerciseNotes" enabled="false"/>
      menuBarCollection= new XMLListCollection(menuBarXML);


      Nothing specila here, I took it from adobe site examples.


      Now I need to enable/disable dinamically some menuitems, but can't find a good way to get the menu item I need (for example by id). Could anybody help?


      Thaks in advance,