1 Reply Latest reply on May 7, 2009 5:00 AM by alden963

    How to replace mouse cursor.

    alden963

      How would you replace the mouse cursor in ActionScript 3?  I mean with like a movie clip or a graphic within Flash.  Thanks.  Code prefered.

        • 1. Re: How to replace mouse cursor.
          Ned Murphy Adobe Community Professional & MVP

          You would need to use a movieclip so that you can assign an instance name to it... here I use cursorMC as the instance name:

           

          Mouse.hide();

           

          function followMouse(evt:MouseEvent): void{

               cursorMC.x = mouseX;

               cursorMC.y = mouseY;

          }

           

          stage.addEventListener(MouseEvent.MOUSE_MOVE, followMouse);