Flash Lite 2 |
|||
| Flash Lite 2.x ActionScript リファレンスガイド > ActionScript クラス > TextFormat > color (TextFormat.color プロパティ) | |||
public color : Number
テキストの色を示す数値。たとえば、0xFF0000 は赤、0x00FF00 は緑など、3 つの 8 ビットの RGB コンポーネントを示す数値です。
メモ : アラビア語、ヘブライ語、タイ語の場合、このプロパティは段落レベルフォーマットでのみ機能します。
使用できるバージョン : ActionScript 1.0、Flash Lite 2.0
次の例では、テキストフィールドを作成し、テキストの色を赤に設定します。
var my_fmt: TextFormat = new TextFormat();
my_fmt.blockIndent = 20;
my_fmt.color = 0xFF0000; // 赤の 16 進数値
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);