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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: This property is supported in Flash Lite only if System.capabilities.hasMouse is<br />

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

Example<br />

The following example returns the current x <strong>and</strong> y coordinates of the mouse on the Stage<br />

(_level0) <strong>and</strong> in relation to a movie clip on the Stage called my_mc:<br />

this.createTextField("mouse_txt", this.getNextHighestDepth(), 0, 0, 150,<br />

66);<br />

mouse_txt.html = true;<br />

mouse_txt.multiline = true;<br />

var row1_str:String = "&nbsp;\t_xmouse\t_ymouse";<br />

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

mouse_txt.htmlText = "";<br />

mouse_txt.htmlText += row1_str;<br />

mouse_txt.htmlText += "_level0\t"+_xmouse+"\t"+_ymouse;<br />

mouse_txt.htmlText += "my_mc\t"+this._xmouse+"\t"+this._ymouse;<br />

mouse_txt.htmlText += "";<br />

};<br />

See also<br />

hasMouse (capabilities.hasMouse property), _ymouse (MovieClip._ymouse<br />

property)<br />

_xscale (MovieClip._xscale property)<br />

public _xscale : Number<br />

Sets the horizontal scale (percentage) of the movie clip as applied from the registration point<br />

of the movie clip. 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 whole pixels. For example, if the parent movie clip is scaled to 50%, setting the _y property<br />

moves an object in the movie clip by half the number of pixels that it would if the movie were<br />

set at 100%.<br />

Example<br />

The following example creates a movie clip called box_mc at runtime. The Drawing API is<br />

used to draw a box in this instance, <strong>and</strong> when the mouse rolls over the box, horizontal <strong>and</strong><br />

vertical scaling is applied to the movie clip. When the mouse rolls off the instance, it returns<br />

to the previous scaling.<br />

this.createEmptyMovieClip("box_mc", 1);<br />

box_mc._x = 100;<br />

box_mc._y = 100;<br />

MovieClip 477

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

Saved successfully!

Ooh no, something went wrong!