Button._x Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Button._x Property Flash 6

horizontal location of the button, in pixels read/write
theButton._x

Description

The floating-point _x property indicates the horizontal position of theButton's registration point. It is measured relative to one of two possible coordinate spaces:

  • If theButton resides on the main timeline, _x is measured relative to the Stage's left edge.

  • If theButton resides on a movie clip instance's timeline, _x is measured relative to the registration point of that parent instance.

The _x property (along with all horizontal coordinates in Flash) increases to the right and decreases to the left.

Button._x is directly analogous to MovieClip._x; see that property entry for full details.

Example

// Place quit_btn 100 pixels to the right of its parent's registration point quit_btn._x = 100; // Move the button over 10 more pixels to the right quit_btn._x += 10;

See Also

Button._y, MovieClip._x



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net