3 Replies Latest reply on Apr 12, 2010 3:27 PM by malachite1234

    showEffect for Menu


      I'm trying to change the default showEffect and hideEffect for a Flex 3 Menu. Instead of the scale/wipe that it does by default when showing a menu, I would like the menu to fade in. But setting showEffect and hideEffect aren't changing anything. Does anyone know how to do this?


      Here is what I currently have, which works for every other component but not the menu:


                  var fade:Fade = new Fade();
                  fade.duration = 1000;
                  mainMenu = Menu.createMenu(this, menuData, false);       
                  mainMenu.labelField = "@label";
                  mainMenu.styleName = "menuText";
                  mainMenu.setStyle("showEffect", fade);
                  mainMenu.setStyle("hideEffect", fade);
                  mainMenu.setStyle("openDuration", 1000);



      Any ideas? Thanks.

        • 1. Re: showEffect for Menu
          malachite1234 Level 1

          Bumping because I've spent way too long on this and still have nothing. Doesn't seem like this should be that difficult.

          • 2. Re: showEffect for Menu
            David_F57 Level 5



            Did not have time to have a good look at this but the interesting thing is if I add a filter to the menu at least the first level observes the fade in  effect, also set the open duration to 0.



            var fade:Fade = new Fade();

            fade.duration = 3000;


            myMenu = Menu.createMenu(this, myMenuData, false);

            myMenu.labelField = "@label";


            myMenu.filters = [new BlurFilter(0,0)];

            myMenu.setStyle("showEffect", fade);

            myMenu.setStyle("hideEffect", fade);






            1 person found this helpful
            • 3. Re: showEffect for Menu
              malachite1234 Level 1

              Thanks David. That's interesting that it applies to the first menu and uses the duration assigned to fade - makes it seem like it's working properly. Any idea how to make it apply to the hideEffect also?