topical media & game development

talk show tell print

student-editor-net-ximpel-components-AppMenuBar.mx

student-editor-net-ximpel-components-AppMenuBar.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <!-- 
      This program is free software: you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation, either version 3 of the License.
  
      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.
  
      You should have received a copy of the GNU General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
          Javier Quevedo Fernández 05-2009.
  -->
  <mx:ApplicationControlBar xmlns:mx="http://www.adobe.com/2006/mxml" dock="true" width="100%">
          <mx:Script>
                  <![CDATA[
                      import mx.events.MenuEvent;
              import flash.events.MouseEvent;
                           import mx.managers.PopUpManager;   
                           import mx.core.Application;     
          
              public function menuHandler(event : MenuEvent):void {
                                  if (event.item.@data == "about"){
                                          var aboutMe : AboutThis = new AboutThis();
                                           PopUpManager.addPopUp(aboutMe,Application(this.parentApplication), true);
                                  PopUpManager.centerPopUp(aboutMe);
                                          
                 }
              }
                  ]]>
          </mx:Script>
          <mx:HBox width="100%">
                           <mx:MenuBar id="myMenuBar" labelField="@label" itemClick="menuHandler(event)">
          <mx:XMLList>
              <menuitem label="File">
                  <menuitem label="New interactive video" data="new"/>
                    </menuitem>
              <menuitem label="Language">
                       <menuitem label="English" type="radio" toggled="true" groupName="two"/>
                  <menuitem label="Español" enabled="false" />
                  <menuitem label="French" enabled="false"/>
                  <menuitem label="German" enabled="false"/>
              </menuitem>
              <menuitem label="Help">
                       <menuitem label="About this editor" data="about"/>
              </menuitem>
          </mx:XMLList>
      </mx:MenuBar>
                              <mx:Spacer width="80%"/>
                          <mx:Spacer width="100%"/>
                          <mx:Button id="viewXmlButton" label="View XML"/>
                  </mx:HBox>
  </mx:ApplicationControlBar>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.