4 Replies Latest reply on May 16, 2006 5:25 PM by brad_sa

    Building submenus/rollout menus. Stuck at road block.

    complexity Level 1
      Hi all,

      I am having some difficulty getting around the idea of building a submen/rollout menu.
      Ok for example when I rollover my main option, I go to the on animation of my submens which is then stopped/paused (showing the full submenu). I got that ok.

      My problem is that what do I do when I rolloff the main option onto the submenu options? (as I have a rollout action on the main option saying to close the submenu animation)

      I have tired using a variable as I move from the main option to a sub option.
      I think I might have over complicated things, could someone please have a look at this file and straighten me out.

      (rollover option 4) I am using transparent buttons at present to hold the actions.
      http://users.ncable.net.au/~timfrancis/menutestingmx_trans_submenus_v2.swf
      http://users.ncable.net.au/~timfrancis/menutestingmx_trans_submenus_v2.fla

      Any help would be appreciated.
        • 1. Re: Building submenus/rollout menus. Stuck at road block.
          brad_sa
          Yeah ... I remember trying to do something similar a while back but found another solution so I didn't bother working out a solution. May I will just throw some thoughts your way and it may trigger something.

          What about when rolling over the button it actually creates a new blank button over the top of it with a new and expanded hit area to cover the new menu options? nah maybe that wouldn't work???

          What about an altered rollOut command that looks for a mouse position to determine whether you are moving the mouse out to the side menu or up/down to another menu?

          I am fairly inexperienced at Flash, but I might give this a go tonight and have a play around.

          I will let you know my findings, likewise if you get it working can you post it here as I would like to have this in my Flash arsenal.

          cheers
          • 2. Re: Building submenus/rollout menus. Stuck at road block.
            Craig Grummitt Level 3
            i suggested a potential solution here:
            http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=288&threadid=1151311&hi ghlight_key=y
            through the magic of cut and paste here it is again:
            One simple way is that you could have an invisible button underneath profile_button that covers the screen which acts to remove the menu buttons(and itself) on rollover. So in other words, rather than profile_button.onRollOut, you're doing more like anything other than profile_button.onRollOver... make sense? if that doesn't work for you, you could check mouse coordinates every x milliseconds by setting an interval...
            • 3. Re: Building submenus/rollout menus. Stuck at road block.
              complexity Level 1
              Hi guys Ive gone back to a previous setup utilising transparent button clip set around the outside of the movie clips, like little rollout pads.

              Take a look if your interested in it brad_sa

              Probably not the most optimised soltuion, but thats the best ive come up with so. Still need to throw a few if statements in to ensure those rolled out submens close off, when the user quickly moves there mouse cross them.

              http://users.ncable.net.au/~timfrancis/menutestingmx_trans_submenus_v3.fla
              • 4. Re: Building submenus/rollout menus. Stuck at road block.
                brad_sa Level 1
                Yeah I was doing something similar last night, and it was working ok apart from if you moved the mouse too quickly. I tried messing around with frame rates, but still couldn't quite get it right. It was a solution but not the best and I have been racking my brain and failry limited flash experience to try and work out a better way.

                Is it possible to have an if statement that involves a rollOut or Over condition. for example if(main1_btn.rollOut=true && mainMask_mc.hitTest=false) {
                _root.myRollOut("subMenu1_mc");
                }

                where
                main1_btn is my main menu button
                subMenu1_mc is the sub menu associated with main1_btn. This submenu holds all the submenu buttons.
                mainMask_mc is a mask created to cover the area of main1_btn and subMenu1_mc.
                myRollOut is a function created to handle the fade out of the submenus.

                because I am not that great with actionscript yet, I am unsure if you can use the rollOver state as a condition in an if statement.

                I will check out your FLA tonight when I get home from work and I will upload a link to FLA I have at the moment.

                cheers