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.

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 />

var table_str:String = "";<br />

table_str += "Stage\t"+"x:"+_xmouse+"\t"+"y:"+_ymouse+newline;<br />

table_str += "Button\t"+"x:"+my_btn._xmouse+"\t"+"y:"+my_btn._ymouse+newline;<br />

table_str += "";<br />

mouse_txt.htmlText = table_str;<br />

};<br />

Mouse.addListener(mouseListener);<br />

See also<br />

_ymouse (Button._ymouse property)<br />

_xscale (Button._xscale property)<br />

public _xscale : Number<br />

The horizontal scale of the button as applied from the registration point of the button,<br />

expressed as a percentage. The default registration point is (0,0).<br />

Scaling the local coordinate system affects the _x <strong>and</strong> _y property settings, which are defined<br />

in pixels. For example, if the parent movie clip is scaled to 50%, setting the _x property moves<br />

an object in the button by half the number of pixels that it would if the SWF file were at<br />

100%.<br />

Example<br />

The following example scales a button called my_btn. When you click <strong>and</strong> release the button,<br />

it grows 10% on the x <strong>and</strong> y axis. Enter the following ActionScript in Frame 1 of the<br />

Timeline:<br />

my_btn.onRelease = function(){<br />

this._xscale ~= 1.1;<br />

this._yscale ~= 1.1;<br />

};<br />

See also<br />

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

property)<br />

Button 275

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

Saved successfully!

Ooh no, something went wrong!