views:

470

answers:

3

Hi, I'm trying to display HTML text in a text field on the stage, but the text formatting doesn't show. I am embedding all font variations in the library (arial bold and arial regular) and I even have dynamic text fields on the stage that embed arial bold and arial regular.

Still, this code does not display bold text:

myField.htmlText = "Regular and <b>bold</b>";

What am I missing?

A: 

it's a font problem. Try to select a system font, like "_sans" or "_serif".

EDIT: in anti-alias select "Use device fonts". This should work with Arial and any other font that is installed in the user machine.

dome
A: 

Have you tried using another html tag such as <i></i> or <a href=""></a>? Sometimes other settings may alter the behavior of your textfield. Have you already tried your textfield inside a new .fla file?

jdecuyper
I've tried every possible combination! Even with empty FLA files containing nothing but those few text fields and fonts.The one thing that DOES work is when I export the exact same code from CS3! So the code is OK and the problem is with CS4?
Ted Brunninkhuis
Hey Ted! Could you post somewhere your misbehaving fla file? Have you already moved the fonts as mentioned by dome?
jdecuyper
A: 

There is a bug in flash that causes html (bold) text to no display. Sometimes opening the text field and adding one regular letter and one bold letter to that text field fixes it, depends on a font though. Hope that saves some people a headache!

Damian