
Mouse.onMouseUp() Listener Event
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
621
listener are not rendered until the next frame refresh, which is determined by the frame rate
of the movie. Unfortunately, in Flash 6, updateAfterEvent() cannot be used to force a
screen refresh from within an onMouseMove() listener; updateAfterEvent() has an effect
only when invoked either from a movie clip mouse or key event or a setInterval() callback.
Hence, in Flash 6, it’s often appropriate to create a movie clip simply to implement
onMouseMove() with a screen refresh. For example:
// Create the movie clip
this.createEmptyMovieClip("mouseListener_mc", 1);
// Assign a callback function to the clip's onMouseMove handler
mouseListener_mc.onMouseMove = function () {
// Respond to mouse movement (details omitted)...then refresh screen
updateAfterEvent();
}
See the Example under Mouse.hide() for custom pointer code. Mouse trailer code is avail-
able at the online Code Depot, in varying degrees of complexity.
See Also
Mouse.addListener(), Mouse.onMouseDown(), Mouse.onMouseUp(), MovieClip.
onMouseMove()
Mouse.onMouseUp() Listener Event
occurs when the primary mouse button is released
Flash 6
listener.onMouseUp()
Description
The onMouseUp() event is the counterpart of onMouseDown(). It occurs each time the
primary mouse button ...