Name
MovieClip._x Property — horizontal location of a clip or movie, in pixels
Availability
Flash 4 and later
Synopsis
mc._x
Access
Read/write
Description
The floating-point _x
property
always indicates the horizontal 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,_x
is measured relative to the Stage’s left edge. For example, an_x
of 20 would indicate that the registration point ofmc
is 20 pixels to the right of the Stage’s left edge; -20 would indicate 20 pixels to the left.
If
mc
resides on another movie clip instance’s timeline,_x
is measured relative to the registration point of that parent instance. For example, an_x
of 20 would indicate that the registration point ofmc
is 20 pixels to the right of its parent instance’s registration point; -20 would indicate 20 pixels to the left.
If
mc
is the main movie,_x
is the horizontal offset of the entire.swf
document relative to the Stage’s left edge. For example, an_x
of 200 would indicate that the contents of the Stage are offset 200 pixels to the right of their author-time position; -200 would indicate 200 pixels to the left.
The _x
property (along with all horizontal
coordinates in Flash) increases to the right and decreases to the
left. Fractional _x
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. ...
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.