
Mouse.onMouseMove() Listener Event
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
620
|
ActionScript Language Reference
rate of the movie. Unfortunately, in Flash 6, updateAfterEvent() cannot be used to force a
screen refresh from within an onMouseDown() listener; updateAfterEvent() has an effect
only when invoked either from a movie clip mouse or key event or a setInterval() callback.
For example:
someMovieClip_mc.onMouseDown = function () {
// Scale the clip to 200% of its original size.
this._xscale = this._yscale = 200;
// Refresh the screen. In Flash 6, this does not work in a mouse listener.
updateAfterEvent();
}
See Also
Button.onPress(), Mouse.addListener(), Mouse.onMouseMove(), Mouse.onMouseUp(),
MovieClip.onMouseDown()
Mouse.onMouseMove() Listener Event
occurs when the mouse pointer moves
Flash 6
listener.onMouseMove()
Description
The onMouseMove() event lets us detect changes in the mouse pointer’s position. When-
ever the mouse is in motion, onMouseMove() events are issued repeatedly, as fast as the
processor can generate new events. Each time onMouseMove() executes, we know the
mouse pointer has changed position. We can check that position relative to any movie clip
by querying the clip’s
_xmouse and _ymouse properties. To check the position of the mouse
pointer relative to the main Stage, use
_root._xmouse and _root._ymouse ...