Skip to main content
Known Participant
October 27, 2026
Question

ActionScript 3.0 Mouse.hide() causes system cursor to disappear on macOS Tahoe

Okay, I’ve shown this code for years and it worked fine, and it works fine on Windows machines and older Macintoshes, but now when we run this code on a Mac OS on a M-chip the Cursor completely disappears from the computer, but just in the Stage.

This is using ActionScript 3.0. We are making Custom Cursors, in this case the Cursor is named “Pumpkin_Cursor”. When we run the test the cursor shows up as the pumpkin image, but if you move the mouse outside of the stage you get no cursor. When you CLOSE the test SWF stage there is no cursor! You have to quit Adobe Animate and restart it.

 

stage.addChild(Pumpkin_Cursor);
Pumpkin_Cursor.mouseEnabled = false;
Pumpkin_Cursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);

function fl_CustomMouseCursor(event:Event)
{
    Pumpkin_Cursor.x = stage.mouseX;
    Pumpkin_Cursor.y = stage.mouseY;
}
Mouse.hide();

 

Now, YES once we ADD additional code to Re-Show the mouse Cursor it does come back, but only Sometimes! But when testing just the cursor replacement it’s unnerving that the Mac OS does not retore the mouse cursor when you close the test SWF file!

    2 replies

    Known Participant
    October 27, 2026

    Finally, we attempted tis code to see if this would help the issue, but it only worked intermittently.
     

    import flash.ui.Mouse;

    Mouse.hide();

    stage.addEventListener(Event.MOUSE_LEAVE, restoreCursor);

    function restoreCursor(e:Event):void {
        Mouse.show();
    }

    Translate
    Known Participant
    October 27, 2026

    And before anyone “solves” the problem with more code, that is not the issue.

    Later in the lesson we had buttons to toggle on and off the cursor as the code below shows. BUT if you END the SWF file with the Cursor in the alternate cursor the Mac Cursor does not come back!

    //Restore the default mouse pointer by clicking Turn Off Button

    Turn_Off_Button.addEventListener(MouseEvent.CLICK, fl_TurnOffButton);

    function fl_TurnOffButton(event:MouseEvent):void
    {
        stage.removeChild(Pumpkin_Cursor);
        Mouse.show();
    }

    //Turns on Pumpkin pointer by clicking Turn On Button

    Turn_On_Button.addEventListener(MouseEvent.CLICK, fl_TurnOnButton);

    function fl_TurnOnButton(event:MouseEvent):void
    {
        stage.addChild(Pumpkin_Cursor);
        Pumpkin_Cursor.x = stage.mouseX;
        Pumpkin_Cursor.y = stage.mouseY;
        Mouse.hide();
    }

    Translate