show (Mouse.show method)

public static show() : Number

Displays the mouse pointer in a SWF file. The pointer is visible by default.

Availability: ActionScript 1.0; Flash Player 5

Returns

Number - 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.

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();
};

The MovieClip.getNextHighestDepth() method used in this example requires Flash Player 7 or later. If your SWF file includes a version 2 component, use the version 2 components' DepthManager class instead of the MovieClip.getNextHighestDepth() method.

See also

hide (Mouse.hide method), _xmouse (MovieClip._xmouse property), _ymouse (MovieClip._ymouse property)