9 Replies Latest reply on Feb 19, 2007 8:58 AM by ggshow

    Button w/in movie clip not working

    VC727
      I know this question has been raised before and it usually just boils down to using the frame #'s and labels. But, even with that it is not working.

      I have a map of the US and when each state is rolled over I would like a menu to appear - this menu is a list with several options and all of the options are buttons. I have it set up so that each state is its own MovieClip and each has an invisible button over it for the hit area and the menu to appear. (i didn't want it to be simply when it rolls over the state movie clip because the hit would be square, covering other states and causing a mess of pop up menus)

      Anyway, the menu pops up fine, but the buttons within do not work. Any ideas of what I'm doing wrong? Thanks Much!!!!

      wi_mc.stop(); // wi_mc is the state movie clip
      wi_btn.onRollOver = function(){ //wi_btn is the invisible button
      wi_mc.gotoAndStop(15); //frame 15 is where my menu resides
      }
      wi_btn.useHandCursor = false;
      wi_mc.onRollOut = function(){
      wi_mc.gotoAndStop(1);
        • 1. Re: Button w/in movie clip not working
          ggshow Level 2
          if your mc got onRollOut, or onPress onRelease etc, all buttons inside the mc will be disabled.
          • 2. Re: Button w/in movie clip not working
            Sketchsta Level 1
            on frame 15 of wi_mc, where your sub-menu is. Make your sub-menu a movieClip, and all the buttons inside that movieClip.

            this should work, i use it all the time.
            • 3. Re: Button w/in movie clip not working
              VC727 Level 1
              Thanks for the input! I've made the adjustments and took all onRollOut etc functionality off the movie clips. Also - I made the submenu it's own movie clip and the button rollover highlights are actually visible now.

              Problem now is - how do I make my menu disappear once a user rolls away if I can't place that functionality on the movie clip? I attempted placing an invisible button the size of my movie clip over it with no success. Seems like a messy process anyway there's got to be a better way.....right?

              Thanks!
              • 4. Re: Button w/in movie clip not working
                ggshow Level 2
                invisible is an easier way (easier to understand)

                another way is set the menu disappear based on
                mouse position (_xmouse & _ymouse)
                • 5. Re: Button w/in movie clip not working
                  VC727 Level 1
                  Alright, I've made adjustments to how I've got it all set up. I've made the menu it's own swf file, (seeing as how I'm going to have 48 of them in total I figured it was less messy to have each as their own file). Anyways... here's the current problem and I'm hoping someone has a good explaination for why this would be happening...

                  on my main file I have 2 invisible buttons - 1 is calling the movie to load when rolled over and the other is calling the movie to unload when a roll-out occurs. RollOver works great - fully functional menu shows up. Roll out, however, is having some issues. The invisible button is in the same location of the menu, same size etc. so that when the user rolls away from this the menu should "unload".

                  For some reason it's acting as if the hit area for the roll out is off. I did a trace to find out where it's saying the rollout areas are and the first is actually when I roll onto it, then only again when i roll out from the left side of the graphic. I've tried deleting the button and creating a new one but the same thing is happening.

                  Any ideas for a very confused person trying to complete this simple task of unloading a swf via rollout? MUCH appreciated!!!!

                  this.createEmptyMovieClip("ExternalSWFHolder", this.getNextHighestDepth());
                  var SWFLoader:MovieClipLoader = new MovieClipLoader();

                  wi_btn.onRollOver = function(){
                  SWFLoader.loadClip("wi_menu.swf", ExternalSWFHolder);
                  }
                  wi_rollout.onRollOut = function (){
                  SWFLoader.unloadClip(ExternalSWFHolder);
                  }
                  • 6. Button w/in movie clip not working
                    ggshow Level 2
                    dont use onRollOut for your wi_rollout

                    make your wi_rollout a very big button which will cover the whole stage area,
                    and got a hole inside the button



                    wi_rollout.onRollOver = function (){
                    SWFLoader.unloadClip(ExternalSWFHolder);
                    }
                    • 7. Re: Button w/in movie clip not working
                      Sketchsta Level 1
                      lol @ gshow...


                      nice diagram.. =P
                      • 8. Re: Button w/in movie clip not working
                        VC727 Level 1
                        Works perfect!!! Thank you both for your input on this topic! Sketchsta is right - that is a really nice diagram.
                        • 9. Re: Button w/in movie clip not working
                          ggshow Level 2
                          welc me