
Mouse.onMouseDown() Listener Event
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
619
To change a custom pointer to a custom hand pointer when the mouse hovers over a
button, use that button’s rollOver event to set the custom pointer clip to a frame
containing the custom hand, and use the rollOut event to set the custom pointer back to
the default, as follows:
go_btn.onRollOver = function () {
_root.customPointer_mc.gotoAndStop("hand");
}
go_btn.onRollOut = function () {
_root.customPointer_mc.gotoAndStop("default");
}
In all cases, remember to place the custom pointer on the top layer of your movie so that it
appears above all other content. Alternatively, use duplicateMovieClip() or attachMovie() to
generate the custom pointer clip dynamically and assign it a very high depth.
See Also
Mouse.show(), MovieClip._xmouse, MovieClip._ymouse
Mouse.onMouseDown() Listener Event
occurs when the primary mouse button is depressed
Flash 6
listener.onMouseDown()
Description
Like the Button.onPress() event, the onMouseDown() event detects the downstroke of a
mouseclick. Unlike the button press event, onMouseDown() is not tied to the hit area of a
button object (a button’s hit area is defined graphically when you create the button in the
Flash authoring tool, whereas a movie clip’s hit area can also be set via the
hitArea ...