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
mcresides on the main timeline,_ yis measured relative to the Stage’s top edge. For example, a_ yof 20 would indicate that the registration point ofmcis 20 pixels below the Stage’s top edge; -20 would indicate 20 pixels above.
If
mcresides on another movie clip instance’s timeline,_ yis measured relative to the registration point of that parent instance. For example, a_ yof 20 would indicate that the registration point ofmcis 20 pixels below its parent instance’s registration point; -20 would indicate 20 pixels above.
If
mcis the main movie,_ yis the vertical offset of the entire.swfdocument relative to the Stage’s top edge. For example, a_ yof 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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access