0 Replies Latest reply on Oct 14, 2011 3:46 PM by Gustavo Duenas

    accesing sub-items on menubarcomponent

    Gustavo Duenas Level 1

      Hi I have this menu bar.


      <mx:MenuBar width="1079.697" height="40.151516" id="mBar" labelField="@label" creationComplete="init()" fontSize="14" fillAlphas="[0.26, 0.26, 0.26, 0.26]" fontWeight="bold" cornerRadius="6" color="#071243" fontFamily="Arial" verticalCenter="-4" left="9.05">



                                    <mx:XMLList xmlns="">

                                        <item label="Petici—n de Oraci—n"/>

        <item label="Petici—n de Visita"/>

                                              <item label="Cont‡ctenos"/>

                                              <item label="Publicaciones">

        <item label="La Biblia Antiguo Testamento" groupName="libros"/>

        <item label="La Biblia Nuevo Testamento" groupName="libros"/>

        <item label="Concordancia Tem‡tica de la Biblia" groupName="libros"/>

                                                        <item label="Doctrina Cristiana" groupName="libros"/>


        <item label="Iglesia FLS Blog"/>

                                              <item label="Donaciones"/>





      I wan to access the group name libros items to add evenListeners to them.


      I have this code to access the main ones on the menuBar.



        protected function init():void{


                                              var mbiBlog:MenuBarItem= mBar.menuBarItems[4] as MenuBarItem;

                                              mbiBlog.addEventListener(MouseEvent.CLICK, openWindowBlog);

                                              var mbiAntiguoT:MenuBarItem = mBar.menuBarItems[3].root[1] as MenuBarItem;// I've been trying to access the sub-Items I really don't know how, some help please.

                                              mbiAntiguoT.addEventListener(MouseEvent.CLICK, windowBibliaAntigua);