5 Replies Latest reply on May 10, 2009 6:42 PM by Ned Murphy

    Buttons and Dropdown Menu Problem

    redsand209 Level 1

      I'm a bit new to action script, and I am having a small (hopefully easily solved) problem.

       

      I'm creating a webpage, and I have made some buttons.

       

      Image 1 is the homepage, which is frame 1 in Flash.

       

      Image 2 shows that when I rollover the button "Portfolio," I get a dropdown menu.

      I have this set as frame 3 in Flash.

       

      Image 3 shows that I've gone down the dropdown menu and rolled over "Photography."

      But if I rollout of any of the things from the dropdown menu, it stays at Image 2 (Frame 3)

      with the dropdown menu visible. Which is a problem...

       

      I want to be able to rollout of these buttons to revert back to the homepage, Image 1 (Frame 1).

      But, for instance, telling "Graphic Design" to go to Frame 1 on rollout means that if I try to go below

      "Graphic Design" to "Photography," I've rolled out--and so the rest of the menu disappears.

       

      So I want to roll be able to select anything from the dropdown menu, and only rollout to Frame 1

      if I go outside the entire dropdown menu, not just one button.

       

      How do I do that?

        • 1. Re: Buttons and Dropdown Menu Problem
          Ned Murphy Adobe Community Professional & MVP

          What I usually end up doing in cases like this (which is seldom enough that someone else might have better options for you) is to have the submenu buttons include code that also act to hold out the submenu, so even though you rollout of the primary button, the submenu buttons catch it as a rollover and tells it to stay where it is.

          1 person found this helpful
          • 2. Re: Buttons and Dropdown Menu Problem
            redsand209 Level 1

            Well no other posts into my inquiry yet--

             

            so yes, that sounds like it would work.

            how do i find that code?

            and implement it?

            • 3. Re: Buttons and Dropdown Menu Problem
              Ned Murphy Adobe Community Professional & MVP

              The main button has some kind of rollover code that causes the submenu to appear.  If the appearance is immediate, then that's probably the same code you'd add to the submenu buttons.  If it is an animated appearance, then you would need something that tells the animation to stay where it is.

               

              You should try Googling "AS2 drop down menu tutorial".  You  probably find some complete solutions that take a more standard approach.  I generally pursue making things work in whatever way I can devise using the tools I know of... there is likely a different approach that is easier to understand.

              • 4. Re: Buttons and Dropdown Menu Problem
                redsand209 Level 1

                Thank you, I did the search you recommended, and the thing I came across that was the easiest to do and to implement was invisible buttons. I didn't realize a button could have a hit space without an up value, or something visible! Which lead me to figure out that the two buttons on either side of Portfolio in my main navigation bar can have a rollover function and a separate release function to get out of the dropdown menu that way as well. Perfecto. I feel like a genius! (even though this is really really simple).

                • 5. Re: Buttons and Dropdown Menu Problem
                  Ned Murphy Adobe Community Professional & MVP

                  Google is one of the best resources for finding solutions.  Dor me, it has been the better of the two references I normally rely on for resolving things.