Mouse.hide() not functioning in mac projector
Copy link to clipboard
Copied
Until now I'm working with Flash CC 2015
in my .AS file I'm using Mouse.hide() that works fine in swf, but in the mac projector and fullscreen the Cursor is visible.
I call the method in my first function. Would there be a better place? May be another workaround?
Thankful for any hint!
Belui

Copy link to clipboard
Copied
I can replicate your issue in a projector file created in Flash CS6. The workaround I was able to make was to turn the FLA project type into an AIR app and use "stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;" to make the app go true fullscreen on my Mac and the mouse cursor was not visible then.
The other thing I noticed is if I just maximized the Mac projector file, leaving the menu bar and window chrome, the mouse would actually hide. Only true fullscreen made the mouse still visible on a project.
Copy link to clipboard
Copied
I used as a workaround (on a black background):
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.Mouse;
var cursor: Sprite;
cursor = new Sprite(); | ||
cursor.graphics.beginFill(0x000000); | ||
cursor.graphics.drawCircle(0, 0, 1); | ||
cursor.graphics.endFill(); | ||
addChild(cursor); |
stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor); | ||
Mouse.hide(); |
function redrawCursor(event: MouseEvent): void { | |||
cursor.x = event.stageX; | |||
cursor.y = event.stageY; | |||
} |
and the went fullscreen via Strg+F and Mac Cmd+F avoiding the cursor to show when pressing the menue bar.
Thank you for your hint!

Copy link to clipboard
Copied
I just thought of something else you could do that would in theory be easier than having a shape moved to the same position as the mouse (as that could have lag depending on the speed of the mouse movement and the frame rate of the SWF). Assuming you are using Flash Player 10.2 or higher as your target player version, you can set a custom mouse cursor graphic.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/MouseCursorData.html
According to the documentation, "Transparency is supported on most operating systems". So if you wanted to give it a shot, you could in theory create an invisible mouse cursor graphic that would yield the same result without having to constantly move a shape to match the position of the mouse.

