I have problem assigning color to a dynamic textfield using TextFormat Object. Does anybody knows??
This example i got from Flash Help but this also doesnt work:
The following example creates a text field and sets the text color to red.
var my_fmt:TextFormat = new TextFormat();
my_fmt.blockIndent = 20;
this.createTextField(“my_txt”, 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.textColor = “#C6032A” // this is what i worte but not working either
my_txt.border = true;
my_txt.text = “this is my first test field object text”;
my_txt.setTextFormat(my_fmt);
Wait I just tried it and it did work…[AS]var my_fmt:TextFormat = new TextFormat();
my_fmt.blockIndent = 20;
this.createTextField(“my_txt”, 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.textColor = “0xC6032A”;
my_txt.border = true;
my_txt.text = “this is my first test field object text”;
my_txt.setTextFormat(my_fmt);
[/AS]