User Guide

488 Chapter 2: ActionScript Language Reference
Mouse.show()
Availability
Flash Player 5.
Usage
Mouse.show() : Number
Parameters
None.
Returns
An integer; either 0 or 1. If the mouse pointer was hidden before the call to Mouse.show(), then
the return value is
0. If the mouse pointer was visible before the call to Mouse.show(), then the
return value is
1.
Description
Method; displays the mouse pointer in a SWF file. The pointer is visible by default.
Example
The following example attaches a custom cursor from the library when it rolls over a movie clip
called
my_mc. Give a movie clip in the Library a Linkage identifier of cursor_help_id, and add
the following ActionScript to Frame 1 of the Timeline:
my_mc.onRollOver = function() {
Mouse.hide();
this.attachMovie("cursor_help_id", "cursor_mc", this.getNextHighestDepth(),
{_x:this._xmouse, _y:this._ymouse});
};
my_mc.onMouseMove = function() {
this.cursor_mc._x = this._xmouse;
this.cursor_mc._y = this._ymouse;
};
my_mc.onRollOut = function() {
Mouse.show();
this.cursor_mc.removeMovieClip();
};
See also
Mouse.hide(), MovieClip._xmouse, MovieClip._ymouse