How can I make my strings and text attributes bold in my actionscript code?
I'm working with the code behind pattern so i have an mxml component with a text attribute. I then have my actionscript component where I concatenate three text attribute and set them as the text property on the mxml text component.
I want to be able be flexible with the styles of each text field I concatenate. I want the first text bold and the last bold however. Any ideas?
Best Answer
If you want to use different font weights for a text, you have no other choice than creating 2 text components (Label, Text, ...).
If you use external fonts, be sure to embed both normal and bold fonts :
and set some styles in your css like :
You can then set the styleName property of your text components :
In Action Script :