2 Replies Latest reply on Aug 20, 2006 12:29 PM by shbinga

    comboBox screws up mouse events

    Level 7
      I'm having a problem where after selecting something from a comboBox, the
      mouse events sent to buttons and movieClips (that have nothing to do with
      the comboBox) no longer work correctly.

      After using the comboBox, if you click on a button or movieClip, without
      moving the mouse, the button or movieClip no longer receives mouse events
      until the mouse is moved.

      This is most noticable with something like a "Next" button, that is clicked
      repeatedly without moving the mouse. The first click will work, then other
      clicks will stop working (as well as rollOver). If you move the mouse just
      one pixel over, then it works again.

      This is easily reproduced in a test fla. Create a button that traces
      "press" and "release". Put a comboBox on the stage with a few items and be
      sure to name the comboBox instance.

      Has anyone experienced this and has a workaround. The only workaround I
      have found is to not use comboBox..



        • 1. Re: comboBox (and input text fields) screws up mouse events
          Level 7
          OK, I still think this is a bug, but I've found a workaround:

          The problem is that the comboBox contains an input text field, and even if
          you have the comboBox's editable property set to false, the input text field
          gets FOCUS when you click on the comboBox. Then when you go and click on
          the button, the input text field still has focus, and not the button. Why
          the button stops working after the first click and release is what seems
          like a bug. The button does not have focus and clicking on it doesn't give
          it focus. You can see the same thing if you put an input text field on the
          stage, play the movie and click in the text field. Even though you are
          clicking on the button, the i-beam is still blinking in the text box, and
          you will see the same messed up functionallity that I originally described.

          Here is the workaround. You have to explicitly give the button focus.


          _focusrect = false; // don't want yellow box around item in focus

          test_btn.onPress = function() {
          trace("press");
          focusManager.setFocus(this); // this sets focus back to the button
          }

          test_btn.onRelease = function() {
          trace("release");
          }


          Chris



          "Chris" <mm@galaxybeing.com> wrote in message
          news:e3o6q0$ga5$1@forums.macromedia.com...
          > I'm having a problem where after selecting something from a comboBox, the
          > mouse events sent to buttons and movieClips (that have nothing to do with
          > the comboBox) no longer work correctly.
          >
          > After using the comboBox, if you click on a button or movieClip, without
          > moving the mouse, the button or movieClip no longer receives mouse events
          > until the mouse is moved.
          >
          > This is most noticable with something like a "Next" button, that is
          > clicked
          > repeatedly without moving the mouse. The first click will work, then
          > other
          > clicks will stop working (as well as rollOver). If you move the mouse
          > just
          > one pixel over, then it works again.
          >
          > This is easily reproduced in a test fla. Create a button that traces
          > "press" and "release". Put a comboBox on the stage with a few items and
          > be sure to name the comboBox instance.
          >
          > Has anyone experienced this and has a workaround. The only workaround I
          > have found is to not use comboBox..
          >
          >
          >


          • 2. Re: comboBox (and input text fields) screws up mouse events
            shbinga
            I've experienced the exact same problem, and came up with the exact same workaround. :)