PDA

View Full Version : changing an embedded font's colour


electronic ink
03-04-2003, 01:35 PM
I know this is a stupid request but could any one show me how to change a dynamic text field font's colour. For example when button one is pressed the text is blue and for button two the text is red.

I'm having to use HTML tags at this moment, but it defaults to device fonts when uploaded.

Please can someone help?

cheers

electronic ink

jaybee
03-04-2003, 06:43 PM
you can do it like this:


my_txt.text = "how do you do";
fmt1_fmt = new TextFormat("Verdana",10,0x000000);
fmt2_fmt = new TextFormat("Verdana",10,0xFF0000);

btn1_btn.onRelease = function() {
my_txt.setTextFormat(fmt1_fmt);
}
btn2_btn.onRelease = function() {
my_txt.setTextFormat(fmt2_fmt);
}

electronic ink
03-05-2003, 08:30 AM
Thanks Jaybee

Checking it out now.

electronic ink