How to hide the Mouse with Adobe Flash ActionScript 2.0

Hiding the mouse

The method for hiding the mouse is called hide() and we call it like this:

Mouse.hide();

The code needs to be placed in a frame, not in an event handler since the mouse object is not really a part of any movie clip. If you haven't already, create an Actions layer in your movie and click on the first keyframe. Then, place the Mouse.hide(); code there.

Concurrently, we can show the mouse by using this:

Mouse.show();

This is sort of unecessary because Flash will automatically show the mouse when your programs finishes executing but might come in handle for time when you want to control when the mouse pointer displays.

Also note that if you embed some flash on a web page, the mouse will only hide itself as long as it moves over the movie's area...showing itself when it moves outside.

Be careful that you type the Capital M in Mouse...Flash is picky about it's capitalization.

blog comments powered by Disqus