TextField.color

Hi,

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);


aShIsH

I’m not sure if this will work, but try it anyway:[AS]my_txt.textColor = 0x003468[/AS]Again, I don’t know if it will work.

Hi Dear,

If u look at the code i pasted above u will find what i have tried.
mytext.textColor = “#C6032A”;

but its not working. Any one else pls !!


aShIsh

So I guess the code I gave you didn’t work?

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]

Hi,

Its working here as well. :rabbit:
Thanx…alot


aShIsH

You’re welcome. :}