Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Can't use TextFormat to change color


Aneesha
4/5/2004 10:24:00 PM
Hi

Any ideas as to why I can't change the color of text using the TextFormat()
object?

Here is my code.

this.createTextField("tfield",1,10,10,150,30);
tfield.text = "Here's some text";
tfield.background=true;
//tfNewfield.backgroundColor = "0x00cc00";
tfield.border = true;
format=new TextFormat();
format.textColor = 0x00cc00;
tfield.setTextFormat(format);
Jack.
4/5/2004 10:41:06 PM
try -
format = new TextFormat();
format.color = 0x00cc00;
tfield.setTextFormat(format);

textColor is a property of the textfield object
AddThis Social Bookmark Button