
MovieClip._ymouse Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
710
|
ActionScript Language Reference
If mc is contained by an instance that is scaled and/or rotated, the coordinate space it
inhabits is also scaled and/or rotated. For example, if
mc’s parent is scaled by 200% and
rotated 90 degrees clockwise,
_y will increase toward the left rather than downward, and a
single unit of
_y will actually be 2 pixels instead of 1.
Because switching between instance and main movie coordinate spaces can be cumber-
some, the MovieClip object provides the localToGlobal() and globalToLocal() methods for
performing coordinate-space transformations.
Example
The following onEnterFrame() handler causes ball_mc to move down 5 pixels with each
passing frame (assuming that its coordinate space hasn’t been altered by transformations to
its parent):
ball_mc.onEnterFrame = function () {
this._y += 5;
}
See Also
MovieClip.globalToLocal(), MovieClip.localToGlobal(), MovieClip._x
MovieClip._ymouse Property
vertical location of the mouse pointer
Flash 5
read-only
mc._ymouse
Description
The floating-point _ymouse property indicates the vertical location of the mouse pointer’s
hotspot, relative to the coordinate space of
mc.Ifmc 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 ...