作者:秘密不能说雨 | 来源:互联网 | 2023-06-18 23:44
篇首语:本文由编程笔记#小编为大家整理,主要介绍了AS3动态文本粗体格式相关的知识,希望对你有一定的参考价值。 A dynamic text field doesn't like to be
篇首语:本文由编程笔记#小编为大家整理,主要介绍了AS3动态文本粗体格式相关的知识,希望对你有一定的参考价值。
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).
var boldText:TextFormat = new TextFormat();
with (boldText) {
//fOnt= "Verdana";
//size = 9.8;
//color = 0x000000;
bold = true;
}
my_textfield_txt.setTextFormat(boldText);