5 Replies Latest reply on Jun 29, 2006 8:20 AM by kglad

    accessing buttons within mc

    hushhurt
      ok, i am trying to create a mp3 player within flash.
      i want to create an menu when you rollover an "audio" button. the audio mc fades, and the stop, play, etc. buttons fade in. so i created a movieclip with "audio" and then a tween to fade in the play buttons. I then made a large hitArea button, then told it to play the audio mc tween. except when i roll over the hitArea button, it plays the tween, but i dont have access to any of the buttons.
      are you able to access, buttons within the movieclip? or is the hitArea covering it up?

      hope that makes sense.
        • 1. Re: accessing buttons within mc
          kglad Adobe Community Professional & MVP
          if you have button (or movieclip button) "covering" another button (or movieclip button), it will intercept mouse events. to remedy, either don't "cover" anything that needs to respond to the mouse or use a hitTest() for one of the two overlapping buttons/movieclip buttons.
          • 2. Re: accessing buttons within mc
            hushhurt Level 1
            hey kglad,
            thanks for responding.
            i looked up the hitTest() in the Definitive Guide, and I dont see how I can use the hitTest(); for my buttons.
            i found a website of which results im trying to achieve: http://www.iso50.com/iso50.html.
            on the bottom, he has the audio section. can you figure this out?

            ty
            • 3. Re: accessing buttons within mc
              kglad Adobe Community Professional & MVP
              i don't see any reason to have anything overlap.
              • 4. Re: accessing buttons within mc
                hushhurt Level 1
                ok, i guess i am missing something.
                if i have an area cut out around the play buttons, so the hit area does not cover them up. if i assign a rollover and rollout function to the hit area, will the hit area not rollout when i press the play, stop, etc. buttons that the hit area is now not covering?
                • 5. Re: accessing buttons within mc
                  kglad Adobe Community Professional & MVP
                  yes, your hit area will undergo a rollout. then your buttons will undergo a rollover.

                  so, have your buttons counter the rollout code your hit area would otherwise execute. to be more explicit (and helpful) i would need to know the code the hitarea rollout triggers, but if you use a goto statement to trigger the rollout behavior of your hitarea use another goto statement to counter that. or you could check for a variable's value to decide if your hitarea should trigger a rollout.