ActionScript 3 Labels Bold

I am dynamically adding labels to the form, and I would like some of them to be bold. I cannot find an easy way to make a shortcut vivid in ActionScript. This is very easy to do in MXML. I would think that this would be just an attribute that is set. How to make a shortcut shortcut?

+4
source share
2 answers
myLabel.setStyle("fontWeight", "bold"); 
+8
source

Hmm ... the easiest way would be to do this using the htmlText property, for example:

 label.htmlText = "<b> Hello </b>"; 
+2
source

All Articles