Button._ymouse
Availability
Flash Player 6.
Usage
my_btn._ymouse:Number
Description
Read-only property; indicates the y coordinate of the mouse position relative to the button.
Example
The following example displays the xmouse position for the Stage and a button called
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);
See also
Button._xmouse
my_btn
Button._ymouse
171
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers