3 Replies Latest reply on Jun 1, 2007 7:46 PM by kglad

    Overlapping buttons

    alterego123
      I have buttons continuously moving from left to right across the stage. The problem is they stop on rollover, but since they are overlapping at certain points on the stage the mouse grabs the top object on the top layer regardless if you have another button selected. There are two sections of code. One on the frame and one on the button itself. I tried "enable= false" attempting to disable the other button but no luck. Any input would be greatly appreciated.

      Cheers.
        • 1. Re: Overlapping buttons
          kglad Adobe Community Professional & MVP
          remove the code attached to your buttons and put all the rollOver and rollOut code in the onRollOver and onRollOut methods.
          • 2. Re: Overlapping buttons
            alterego123 Level 1
            I did what you said...thanx again the help, but Im still having issues. The problem is when the cursor is resting on 'mc2' and 'mc1' intersects as it crosses the stage, the cursor stops 'mc1' and allows 'mc2' to advance. Im not sure if im getting conflicts because there are two seperate frames with two seperate scripts running (see below). Or, if its a layers issue. 'mc1' is on layer 10 (above) and 'mc2' is on layer 9 (below). I have ttried if statements, swapdepths, enable, Im not sure what I should be looking at here. I need 'mc1' do be disabled yet still be visible and infront of 'mc2'. Is this even possible?
            • 3. Re: Overlapping buttons
              kglad Adobe Community Professional & MVP
              if two movieclips/buttons overlap mouse events will be intercepted by the top-most movieclip/button and the movieclip/button that's below will not detect a mouse event. there's no way to prevent that behavior.

              to have a movieclip that's not above all others (that have mouse handlers) respond to the mouse you must use a hitTest().