13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Using the Text Layout Framework<br />

Complex script support<br />

Flash Player 10 and later, Adobe AIR 1.5 and later<br />

The TLF provides complex script support. Complex script support includes the ability to display and edit right-to-left<br />

scripts. The TLF also provides the ability to display and edit a mixture of left-to-right and right-to-left scripts such as<br />

Arabic and Hebrew. The framework not only supports vertical text layout for Chinese, Japanese, and Korean, but also<br />

supports tate-chu-yoko (TCY elem<strong>en</strong>ts). TCY elem<strong>en</strong>ts are blocks of horizontal text embedded into vertical runs of<br />

text. The following scripts are supported:<br />

Latin (English, Spanish, Fr<strong>en</strong>ch, Vietnamese, and so on)<br />

Greek, Cyrillic, Arm<strong>en</strong>ian, Georgian, and Ethiopic<br />

Arabic and Hebrew<br />

Han ideographs and Kana (Chinese, Japanese, and Korean) and Hangul Johab (Korean)<br />

Thai, Lao, and Khmer<br />

Devanagari, B<strong>en</strong>gali, Gurmukhi, Malayalam, Telugu, Tamil, Gujarati, Oriya, Kannada, and Tibetan<br />

Tifinagh, Yi, Cherokee, Canadian Syllabics, Deseret, Shavian, Vai, Tagalog, Hanunoo, Buhid, and Tagbanwa<br />

Using the Text Layout Framework in Flash Professional and Flex<br />

You can use the TLF classes directly to create custom compon<strong>en</strong>ts in Flash. In addition, Flash Professional CS5<br />

provides a new class, fl.text.TLFTextField, that <strong>en</strong>capsulates the TLF functionality. Use the TLFTextField class to create<br />

text fields in ActionScript that use the advanced text display features of the TLF. Create a TLFTextField object the same<br />

way you create a text field with the TextField class. Th<strong>en</strong>, use the textFlow property to assign advanced formatting<br />

from the TLF classes.<br />

You can also use Flash Professional to create the TLFTextField instance on the stage using the text tool. Th<strong>en</strong> you can<br />

use ActionScript to control the formatting and layout of the text field cont<strong>en</strong>t using the TLF classes. For more<br />

information, see TLFTextField in the ActionScript 3.0 Refer<strong>en</strong>ce for the Adobe Flash Platform.<br />

If you are working in Flex, use the TLF classes. For more information, see “Using the Text Layout Framework” on<br />

page 427.<br />

Using the Text Layout Framework<br />

Flash Player 10 and later, Adobe AIR 1.5 and later<br />

If you are working in Flex or are building custom text compon<strong>en</strong>ts, use the TLF classes. The TLF is an ActionScript<br />

3.0 library contained <strong>en</strong>tirely within the textLayout.swc library. The TLF library contains about 100 ActionScript 3.0<br />

classes and interfaces organized into t<strong>en</strong> packages. These packages are subpackages of the flashx.textLayout package.<br />

The Text Layout Framework classes<br />

Flash Player 10 and later, Adobe AIR 1.5 and later<br />

The TLF classes can be grouped into three categories:<br />

Data structures and formatting classes<br />

Last updated 6/6/2012<br />

427

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

Saved successfully!

Ooh no, something went wrong!