1 Reply Latest reply on Jun 17, 2009 9:33 AM by joan_lafferty

    Spark MenuBar roll over problem


      After you click on a MenuBar element, its rollover event no longer works.


      Try this:

      <?xml version="1.0" encoding="utf-8"?>
                  import mx.collections.*;
                  import mx.controls.Alert;
                  import mx.events.MenuEvent;


                  public var menuBarCollection:XMLListCollection;
                  private var menubarXML:XMLList =
                          <menuitem label="File" data="top">
                              <menuitem label="Load.." data="load"/>




                  private function initCollections():void {
                      menuBarCollection = new XMLListCollection(menubarXML);


                  private function menuHandler(evt:MenuEvent):void  {
                      var s:String = evt.item.@data;
                      if (evt.item.@data != "top") {




              <s:VGroup width="100%">
                  <mx:MenuBar labelField="@label" itemClick="menuHandler(event);"
                          dataProvider="{menuBarCollection}" width="100%" />




      Click on File > Load, and an alert will show up. Close it and go back to File > Load. "Load" item's rollover is gone

        • 1. Re: Spark MenuBar roll over problem
          joan_lafferty Adobe Employee

          This is a bug that has been around in MenuBar for a while.Its not new to our Flex 4 beta. If you had multiple items in your submenu, the rollOver would return after you rolled over another item. Here is the bug that someone filed a while back. Someone also recommended a workaround:




          The bug is in deferred status because it didn't seem that terrible and we didn't have time to fix it. A contribution from the community to fix it would be great though! Feel free to vote on the bug or leave your comments as to why you'd like to see it fixed.



          Joan Lafferty

          Flex SDK QA