2 Replies Latest reply: Jan 16, 2013 1:20 AM by rahimhaji RSS

    How to restrict the custom mouse cursor area

    rahimhaji Community Member

      Dear Friends,

       

      i have an swf loaded in another frame, i want to show a custom cursor (hand pic). iam using the following code. its working fine in the loaded swf. when i move the mouse to the bottom of the screen that is navigation area in actual frame the cursor has to go back to flash arrow cursor.

       

      var hide_m:Boolean = true;

       

      stage.addEventListener(MouseEvent.MOUSE_MOVE, handmove);

      function handmove(event:MouseEvent) {

          trace(mouseY);

          if (hide_m && mouseY<138) {

              Mouse.hide();

              hand.gotoAndStop(1);

              hand.x = mouseX;

              hand.y = mouseY;

          } else {

              showmouse();

          }

      }

       

      function showmouse() {

      //hide hand pic and show mouse....

          hand.gotoAndStop(2);

      }

       

      it is not working, it shows the hand pic in the stage. but when i move the bottom area that is more than 138, the normal cursor is not coming back pls help me.  to restrict the area to show the custom cursor....

       

      Thanks in advance,

       

      Syed Abdul Rahim