Color (Textformat.color Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

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);
700
ActionScript classes

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Table of Contents