03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

_y (Button._y property)<br />

public _y : Number<br />

The y coordinate of the button relative to the local coordinates of the parent movie clip. If a<br />

button is in the main Timeline, its coordinate system refers to the upper left corner of the<br />

Stage as (0, 0). If the button is inside another movie clip that has transformations, the button<br />

is in the local coordinate system of the enclosing movie clip. Thus, for a movie clip rotated 90<br />

degrees counterclockwise, the enclosed button inherits a coordinate system that is rotated 90<br />

degrees counterclockwise. The button's coordinates refer to the registration point position.<br />

Example<br />

The following example sets the coordinates of my_btn to 0 on the Stage. Create a button<br />

called my_btn <strong>and</strong> enter the following ActionScript in Frame 1 of the Timeline:<br />

my_btn._x = 0;<br />

my_btn._y = 0;<br />

See also<br />

_x (Button._x property), _xscale (Button._xscale property), _yscale<br />

(Button._yscale property)<br />

_ymouse (Button._ymouse property)<br />

public _ymouse : Number [read-only]<br />

Returns the y coordinate of the mouse position relative to the button.<br />

Note: The _ymouse property is supported for Flash Lite 2.0 only if<br />

System.capabilities.hasMouse is true or System.capabilities.hasStylus is<br />

true.<br />

Example<br />

The following example displays the x coordinate of the mouse position for the Stage <strong>and</strong> a<br />

button called my_btn that is placed on the Stage. Enter the following ActionScript in Frame 1<br />

of the Timeline:<br />

this.createTextField("mouse_txt", 999, 5, 5, 150, 40);<br />

mouse_txt.html = true;<br />

mouse_txt.wordWrap = true;<br />

mouse_txt.border = true;<br />

mouse_txt.autoSize = true;<br />

mouse_txt.selectable = false;<br />

//<br />

var mouseListener:Object = new Object();<br />

mouseListener.onMouseMove = function() {<br />

276 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!