1 Reply Latest reply on Jun 27, 2011 12:06 PM by jordana309-36

    Hiding the mouse on two screens

    hbllproductionunit Level 1

      I have a FLEX project that I export to AIR. It has two separate windows that talk to each other, located on different screens. I dynamically resize the windows (setting them to fullScreen after moving them to the needed screen). After, I call Mouse.hide() on both windows. However, the mouse doesn't actually hide unless I click on both screens.


      The problem is that this is a kiosk, and there is no way to click on the other screen because our only interface is a touch screen on one of the screens. I tried to move focus between the windows, but that didn't seem to work. So, I tried this:


              // Switch focus
              controlScreen.alwaysInFront = false;
              controlScreen.enabled = false;
              videoScreen.alwaysInFront = true;
              videoScreen.enabled = true;
              // Put focus back
              videoScreen.alwaysInFront = false;
              controlScreen.alwaysInFront = true;
              controlScreen.enabled = true;



      This, however, doesn't work. Does anybody have an idea what I could do to make the mouse actually disappear? I've tried calling Mouse.hide() in several different places and at different times during the program run, and it's no good...


      If you need more details, ask. I'd be happy to share more.

        • 1. Re: Hiding the mouse on two screens
          jordana309-36 Level 1

          Turns out each window has a cursorManager object. So, to remove the cursors, we first have to clear the cursor managor of all custom cursors, then hide the system mouse in each window. So:



                  // first, we remove all connection to cursors through the cursorManager, then we hide the system manager, leaving us without any visible cursor.



          If you then add a function in the other screen (I called mine loadedAndPlaced() ), you can call that after you set and resize the other window that you had to create using actionScript. This worked beautifully.