Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding bold font in AS3 Flash dynamic field

I have already googled and read a lot of different topics relating to this problem, but still cant solve mine. I have this dynamic text field in a movieclip, and I embeded upper case, lower case and numbers. I exported that movieclip, then used it in my class and it's loading data from xml.

However, after I embedded the bold fonts, it stopped displaying data from xml, if I use regular, it's fine. Then I created a font symbol and add the bold font in the library, it still doesn't give me anything.

Does anyone know how to solve this problem?

thanks.

like image 988
shibbydoo Avatar asked Jul 01 '09 05:07

shibbydoo


2 Answers

The easiest way to fix this problem is to create a set of textfields off screen. Each field will handle the embedding for a single font and weight combination that you need. So, for example, if you need regular, bold, italic and both bold and italic for a single font, they you will have 4 textfields - each with embedding turned on, and the characters you need selected.

Then you can simply turn on font embedding for any other textfield and it will be able to use all four styles (of that font).

like image 105
Branden Hall Avatar answered Oct 19 '22 21:10

Branden Hall


I tried changing every instance to the embedded version font with no success. I WAS however, able to use the solution suggested on the Adobe Forum here:

http://forums.adobe.com/thread/716363

Instead of using myTextFieldInstance.text, use myTextFieldInstance.htmlText and specify "<b>" + yourStringValue + "</b>" during assignment. While kludgey to the max, it was an easy solution to the problem.

like image 39
grey Avatar answered Oct 19 '22 23:10

grey