X (Button._X Property); Xmouse (Button._Xmouse Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

_x (Button._x property)

public _x : Number
An integer that sets the x coordinate of a button relative to the local coordinates of the parent
movie clip. If a button is on the main Timeline, then its coordinate system refers to the upper
left corner of the Stage as (0, 0). If the button is inside a movie clip that has transformations,
the button is in the local coordinate system of the enclosing movie clip. Thus, for a movie clip
rotated 90 degrees counterclockwise, the enclosed button inherits a coordinate system that is
rotated 90 degrees counterclockwise. The button's coordinates refer to the registration point
position.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example sets the coordinates of
to 0 on the Stage. Create a button
my_btn
called
and enter the following ActionScript in Frame 1 of the Timeline:
my_btn
my_btn._x = 0;
my_btn._y = 0;
See also
,
,
_xscale (Button._xscale property)
_y (Button._y property)
_yscale
(Button._yscale property)

_xmouse (Button._xmouse property)

public _xmouse : Number [read-only]
Returns the x coordinate of the mouse position relative to the button.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example displays the xmouse position for the Stage and a button called
my_btn
that is placed on the Stage. Enter the following ActionScript in Frame 1 of the Timeline:
this.createTextField("mouse_txt", 999, 5, 5, 150, 40);
mouse_txt.html = true;
mouse_txt.wordWrap = true;
mouse_txt.border = true;
mouse_txt.autoSize = true;
mouse_txt.selectable = false;
//
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
var table_str:String = "<textformat tabstops='[50,100]'>";
Button
377

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF