PDA

View Full Version : Changing font of a radiobuttongroup in actionscript 3


peltseppo
05-07-2008, 12:05 PM
It's basically what the title says. How do i do it?

thanks in advance.

DiamondDog
05-13-2008, 09:40 PM
Here's how I did it the other day when I was playing around with a couple of radio buttons. Basically, defined a text format and applied that to each of the two radio buttons I was using. I guess something similar should work for a radio button group?


// create a new text format for the radio buttons
var rbTxtFormat:TextFormat = new TextFormat();
rbTxtFormat.color = 0xffffff;
rbTxtFormat.font = "Arial";
rbTxtFormat.size = 12;

// apply our text format to both radio buttons
soundONradioButton.setStyle("textFormat",rbTxtFormat);
soundOFFradioButton.setStyle("textFormat",rbTxtFormat);