Name
MovieClip._y Property — vertical location of a clip or movie, in pixels
Availability
Flash 4 and later
Synopsis
mc._y
Access
Read/write
Description
The
floating-point _ y
property
always indicates the vertical position of mc
’s registration point,
but
it is measured relative to one of three possible coordinate spaces.
If
mc
resides on the main timeline,_ y
is measured relative to the Stage’s top edge. For example, a_ y
of 20 would indicate that the registration point ofmc
is 20 pixels below the Stage’s top edge; -20 would indicate 20 pixels above.
If
mc
resides on another movie clip instance’s timeline,_ y
is measured relative to the registration point of that parent instance. For example, a_ y
of 20 would indicate that the registration point ofmc
is 20 pixels below its parent instance’s registration point; -20 would indicate 20 pixels above.
If
mc
is the main movie,_ y
is the vertical offset of the entire.swf
document relative to the Stage’s top edge. For example, a_ y
of 200 would indicate that the contents of the Stage are offset 200 pixels below their author-time position; -200 would indicate 200 pixels above.
The _ y
property (along with all vertical
coordinates in Flash) increases downward and decreases
upward—the opposite of the Cartesian coordinate system.
Fractional _ y
values are approximated in Flash
with antialiasing (blurring).
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, ...
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.