0 Replies Latest reply on Jan 8, 2007 2:00 AM by MateoMpls

    Drop down menu help?

    MateoMpls
      Newbie question: I have a drop down menu (see below) that gives multiple options when you click on FAQ. I can't figure out how to make it where when one of the options is clicked in that menu, I can change the view state.

      Here's my code, thanks in advance for any help:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:ApplicationControlBar xmlns:mx=" http://www.adobe.com/2006/mxml" width="100%" height="50" horizontalAlign="center">
      <mx:Script>
      <![CDATA[
      import mx.controls.Menu;
      private function createAndShow():void{
      var faq:Menu = Menu.createMenu(null, faqMenuData, false);
      faq.labelField="@label";
      faq.show(315, 181);
      }

      ]]>
      </mx:Script>
      <mx:XML format="e4x" id="faqMenuData">
      <root>
      <menuItem label="Antibacterial Hand Soap"/>
      <menuItem label="Bath &amp; Bowl Cleaner"/>
      <menuItem label="Carpet Extraction Cleaner"/>
      <menuItem label="Floor Cleaner &amp; Degreaser"/>
      <menuItem label="Floor Stripper"/>
      <menuItem label="Heavy Duty Degreaser"/>
      <menuItem label="High Gloss Floor Finish"/>
      <menuItem label="Lemon Fresh Disinfectant Cleaner"/>
      <menuItem label="No Rinse Floor Cleaner"/>
      <menuItem label="Oven, Grill, &amp; Fryer Cleaner"/>
      <menuItem label="Pink Dish Detergent"/>
      <menuItem label="Reusable Foodservice Towels"/>
      </root>
      </mx:XML>
      <mx:Spacer width="30"/>
      <mx:LinkButton label="HOME" click="mx.core.Application.application.currentState=''"/>
      <mx:Spacer width="30"/>
      <mx:LinkButton label="ABOUT US">
      <mx:click>mx.core.Application.application.currentState='about'</mx:click>
      </mx:LinkButton>
      <mx:Spacer width="30"/>
      <mx:LinkButton label="FAQ" click="createAndShow()"/>
      <mx:Spacer width="30"/>
      <mx:LinkButton label="CONTACT US">
      <mx:click>mx.core.Application.application.currentState='contact'</mx:click>
      </mx:LinkButton>