Return to Snippet

Revision: 14276
at May 27, 2009 15:20 by Winkyboy


Initial Code
var boldText:TextFormat = new TextFormat();
with (boldText) {
	//font = "Verdana";
	//size = 9.8;
	//color = 0x000000;
	bold = true;
}

my_textfield_txt.setTextFormat(boldText);

Initial URL
http://board.flashkit.com/board/showthread.php?t=180045

Initial Description
A dynamic text field doesn't like to be set to bold (or italic, whatever).  You can get around this issue by creating a text format in actionscript and setting that field's format to this newly-created one.  This is only good for having a text field where all words in it share the same format (i.e. all words are bold).

Initial Title
AS3 Dynamic text bold format

Initial Tags
text

Initial Language
ActionScript 3