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.

my_txt.replaceText(0, symbolPos, "bird");<br />

} else {<br />

trace("symbol '"+symbol+"' not found.");<br />

}<br />

_rotation (TextField._rotation property)<br />

public _rotation : Number<br />

The rotation of the text field, 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_txt._rotation = 450 is the same as<br />

my_txt._rotation = 90.<br />

Rotation values are not supported for text fields that use device fonts. You must use embedded<br />

fonts to use _rotation with a text field.<br />

Note: This property is not supported for Arabic, Hebrew, <strong>and</strong> Thai.<br />

Example<br />

In this example, you need to create a dynamic text field called my_txt, <strong>and</strong> then use the<br />

following ActionScript to embed fonts <strong>and</strong> rotate the text field. The string my font refers to a<br />

font symbol in the library, with a linkage identifier of my font.<br />

var my_fmt:TextFormat = new TextFormat();<br />

my_fmt.font = "my font";<br />

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160,<br />

120);<br />

my_txt.wordWrap = true;<br />

my_txt.embedFonts = true;<br />

my_txt.text = "Hello world";<br />

my_txt.setTextFormat(my_fmt);<br />

my_txt._rotation = 45;<br />

Apply additional formatting for the text field using the TextFormat class.<br />

See also<br />

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

property), getNewTextFormat (TextField.getNewTextFormat method)<br />

scroll (TextField.scroll property)<br />

public scroll : Number<br />

638 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!