views:

537

answers:

2

I am dynamically adding labels to a form and I would like to set some of them to be bold. I can;t seem to find an easy way to make a label bold in ActionScript. It is very easy to do in MXML. I would think that it would simply be an attribute that is set. How do you make a label bold?

+5  A: 
myLabel.setStyle("fontWeight", "bold");
Joel Hooks
+1  A: 

Hmm... the easiest way I would do it would be using the htmlText property, eg:

label.htmlText = "<b> Hello </b>";
CookieOfFortune