3 Replies Latest reply on May 16, 2007 1:39 AM by Newsgroup_User

    Auto mouse hide?

    Level 7
      I've created a FLV player in flash. After a few seconds of the mouse
      not moving, if it's over the video, I want the mouse to hide.

      Anyone have any examples of this?

      Thanks

      -Rich
        • 1. Re: Auto mouse hide?
          JetAxis
          Do a mouseListener for onMouseMove. Each movement of the mouse it checks if the mouse is moving if it is within the boundaries of the flv clip. Something like: if(_root._xmouse > theFLV.x && _root._xmouse < ....){
          count++; if(count > timeOut) Mouse.hide();}
          you would also have to do a Mouse.show(); if the mouse moves to redisplay the mouse.
          • 2. Re: Auto mouse hide?
            dr_ross Level 1
            I've got one premade and free to use if you like

            www.s152182516.websitehome.co.uk/AdenForshaw/MouseAutoHide.zip

            Hope that helps.
            • 3. Re: Auto mouse hide?
              Level 7
              dr_ross wrote:
              > I've got one premade and free to use if you like
              >
              > www.s152182516.websitehome.co.uk/AdenForshaw/MouseAutoHide.zip
              >
              > Hope that helps.


              Thanks guys..

              I ended up just writing a simple few lines.. However, I'll take a look
              at the class AS that you have perhaps I can use that.

              ---
              // start a keep alive timer for hiding mouse

              var keepMouse_Interval = setInterval(keepMouseUpdater,50);
              var nextTime:Number = 4000;

              function keepMouseUpdater():Void {
              if (nextTime < getTimer()) {
              Mouse.hide();
              nextTime = getTimer() + 4000;
              }
              };

              // bring mouse back on mousemove
              var mouseListener:Object = new Object();
              mouseListener.onMouseMove = function() {
              Mouse.show();
              };
              Mouse.addListener(mouseListener);

              --- problem with mine is that it hides the mouse anywhere the mouse is..
              and not just when it's over the actual video screen

              Thanks!

              -Richard