Name
MovieClip._ymouse Property — vertical location of the mouse pointer
Availability
Flash 5
Synopsis
mc._ymouse
Access
Read-only
Description
The floating-point _ ymouse
property indicates the
vertical location of the mouse pointer’s hotspot relative to
the coordinate space of mc
. If
mc
is a main movie, _ ymouse
is measured from the Stage’s top edge. If
mc
is an instance, _ ymouse
is measured from the instance’s registration
point. To obtain a consistent _ ymouse
coordinate
that is always measured relative to the Stage, use _root._ ymouse
.
Example
Placing the following code on a clip causes it to mirror the mouse pointer’s vertical position relative to the Stage (it moves up and down in a straight line):
onClipEvent (enterFrame) { _y = _root._ymouse; }
See Also
MovieClip
._xmouse
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.