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.

Example<br />

This example sets the rendering quality of a button named my_btn to LOW:<br />

my_btn._quality = "LOW";<br />

_rotation (Button._rotation property)<br />

public _rotation : Number<br />

The rotation of the button, in degrees, from its original orientation. Values from 0 to 180<br />

represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.<br />

Values outside this range are added to or subtracted from 360 to obtain a value within the<br />

range. For example, the statement my_btn._rotation = 450 is the same as<br />

my_btn._rotation = 90.<br />

Example<br />

The following example rotates two buttons on the Stage. Create two buttons on the Stage<br />

called control_btn <strong>and</strong> my_btn. Make sure that my_btn is not perfectly round, so you can<br />

see it rotating. Then enter the following ActionScript in Frame 1 of the Timeline:<br />

var control_btn:Button;<br />

var my_btn:Button;<br />

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

my_btn._rotation += 10;<br />

};<br />

Now create another button on the Stage called myOther_btn, making sure it isn’t perfectly<br />

round (so you can see it rotate). Enter the following ActionScript in Frame 1 of the Timeline.<br />

var myOther_btn:Button;<br />

this.createEmptyMovieClip("rotater_mc", this.getNextHighestDepth());<br />

rotater_mc.onEnterFrame = function() {<br />

myOther_btn._rotation += 2;<br />

};<br />

See also<br />

_rotation (MovieClip._rotation property), _rotation (TextField._rotation<br />

property)<br />

_soundbuftime (Button._soundbuftime property)<br />

public _soundbuftime : Number<br />

Specifies the number of seconds a sound prebuffers before it starts to stream.<br />

268 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!