Hello All,
After a lot of experiments and reading many articles, Q&As, I still didn't find the answers to my problem, then I decided to ask my question at great stackoverflow forum:-)
The setup of my project is as follows: - Create an AS3 project in Flash Builder 4 (Main.as3proj), and write source code in it; - Create graphical assets in Flash CS5; - Load the graphical assets in the AS3 project;
In the graphical assets (swfs), there are text fields, we would like to use Embedded fonts for the text fields. But we don't want to embed the fonts in all swfs, we want to create a swf as a font library (FontLib.swf), that embed all the fonts needed across all the graphical assets (swfs).
After loading or embedding the FontLib.swf to the main application (Main.swf), the embedded fonts is availabe:
TextField.isFontCompatible(myFontName, myFont)
is true. And when I create a TextField with the embedded font at runtime, it works fine.
But besides this, I want to use the embedded fonts for the TextFields in other graphical assets like what I described at the begging, but when I try to change the text for the dynamic text field in a movie clip, the text field will disappear. (Before changing the text, it can be displayed because Flash CS5 automatically embed the fonts for the characters already input in the fla/swf file).
I tried to clone the text field with the same properties of the text field in the movie clip and replaced the old one, as I said, this works as other text fields created at run time. But I have other problem with cloning and replacing the text fields in movie clip.
I wonder if there is a way to instruct the flash player to use the externally loaded embedded fonts for the text fields in movie clip.