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
mcresides on the main timeline,_xis measured relative to the Stage’s left edge. For example, an_xof 20 would indicate that the registration point ofmcis 20 pixels to the right of the Stage’s left edge; -20 would indicate 20 pixels to the left.
If
mcresides on another movie clip instance’s timeline,_xis measured relative to the registration point of that parent instance. For example, an_xof 20 would indicate that the registration point ofmcis 20 pixels to the right of its parent instance’s registration point; -20 would indicate 20 pixels to the left.
If
mcis the main movie,_xis the horizontal offset of the entire.swfdocument relative to the Stage’s left edge. For example, an_xof 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. ...
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