_global.shots++;
}
};
Mouse.addListener(mouseListener);
To view the entire script, see the animation.fla file in the ActionScript samples Folder. The
following list shows typical paths to the ActionScript samples Folder:
Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
See also
onMouseDown (Mouse.onMouseDown event listener)
(Mouse.onMouseMove event listener)
,
listener)
onMouseWheel (Mouse.onMouseWheel event listener)
hide (Mouse.hide method)
public static hide() : Number
Hides the pointer in a SWF file. The pointer is visible by default.
Availability: ActionScript 1.0; Flash Player 5
Returns
- An integer; either
Number
then the return value is
Mouse.hide(),
, then the return value is
Mouse.hide()
Example
The following code hides the standard mouse pointer, and sets the x and y positions of the
movie clip instance to the x and y pointer position. Create a movie clip and set its
pointer_mc
Linkage identifier to
Timeline:
// to use this script you need a symbol
// in your library with a Linkage Identifier of "pointer_id".
this.attachMovie("pointer_id", "pointer_mc", this.getNextHighestDepth());
Mouse.hide();
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
pointer_mc._x = _xmouse;
pointer_mc._y = _ymouse;
808
ActionScript classes
or
. If the mouse pointer was hidden before the call to
0
1
0
.
1
. Add the following ActionScript to Frame 1 of the
pointer_id
,
onMouseMove
,
onMouseUp (Mouse.onMouseUp event
. If the mouse pointer was visible before the call to
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?