
Button._x Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
476
|
ActionScript Language Reference
Button._width is directly analogous to MovieClip._width; see that property entry for full
details.
Example
// Check start_btn's width
trace(start_btn._width);
// Set start_btn's width to 200
start_btn._width = 200;
// Create a text field 10 pixels to the right of start_btn, assuming
// that start_btn's top left corner is at the registration point
start_btn._parent.createTextField("theField_txt",
1,
start_btn._x + start_btn._width + 10,
start_btn._y,
200, 20);
theField_txt.border = true;
theField_txt.text = "Click the button to start.";
See Also
Button._height, MovieClip._width
Button._x Property
horizontal location of the button, in pixels
Flash 6
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 ...