![MACROMEDIA Flash Lite 2 Скачать руководство пользователя страница 700](http://html1.mh-extra.com/html/macromedia/flash-lite-2/flash-lite-2_reference_687553700.webp)
700
ActionScript classes
Example
The following example creates a new text field at runtime, and puts a string with a line break
into the field. The TextFormat class is used to format the characters by adding bullets to each
line in the text field. This is demonstrated in the following ActionScript:
var my_fmt:TextFormat = new TextFormat();
my_fmt.bullet = true;
this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.border = true;
my_txt.text = "this is my text"+newline;
my_txt.text += "this is more text"+newline;
my_txt.setTextFormat(my_fmt);
color (TextFormat.color property)
public color :
Number
A number that indicates the color of text. The number contains three 8-bit RGB components;
for example, 0xFF0000 is red, and 0x00FF00 is green.
Note:
For Arabic, Hebrew, and Thai, this property works for paragraph-level formatting only.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a text field and sets the text color to red.
var my_fmt:TextFormat = new TextFormat();
my_fmt.blockIndent = 20;
my_fmt.color = 0xFF0000; // hex value for red
this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.border = true;
my_txt.text = "this is my first text field object text";
my_txt.setTextFormat(my_fmt);
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...