Download Flash Lite 2.x and 3.x ActionScript Language Reference
Transcript
FLASH LITE 2.X AND 3.X ACTIONSCRIPT LANGUAGE REFERENCE
ActionScript classes
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
Flash Lite 2.0
Example
The following example sets the coordinates of my_btn to 0 on the Stage. Create a button called my_btn and enter the
following ActionScript in Frame 1 of the Timeline:
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.
Note: The _xmouse property is supported for Flash Lite 2.0 only if System.capabilities.hasMouse is true or
System.capabilities.hasStylus is true..
Availability
Flash Lite 2.0
Example
The following example displays the x coordinate of the mouse 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]'>";
table_str += "<b>Stage</b>\t"+"x:"+_xmouse+"\t"+"y:"+_ymouse+newline;
table_str += "<b>Button</b>\t"+"x:"+my_btn._xmouse+"\t"+"y:"+my_btn._ymouse+newline;
table_str += "</textformat>";
mouse_txt.htmlText = table_str;
};
Mouse.addListener(mouseListener);
Last updated 12/20/2010
238
Related documents
Developing Adobe® Flash® Lite™ 2.x and 3.x Applications
macromedia® - dadanini.at
Using Components
User Manual 270-418-01 System Monitor Board
KoolMoves User Guide
MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifications
3D Book User Manual - Boutique Décor Chaleur
Adobe 8 Saw User Manual
BOLEX S-221 Technical information
Adobe® Flash® Lite™ 1.x Adobe® ActionScript® Language