Sometimes we find a font that suits our necessities (is that the word?, well, i think you have realized English is not my first language) but when we use them and someone in a different computer tries to see it, he just get the text in Times new Roman or Arial because he doesn't has the font you used. The way to solve this problem is to use embed fonts. What you do is put the font in the file and then use it. This is how:
First open the document where you want to use your font.
Open the library (window>library). Right clic on an empty space of the library and select 'New Font...'. Name: myFont, font: look up the font you want to use. Hit OK. Right clic the font in the library and select 'Linkage...'. Export for action script and export in first frame must be checked. Identifier: myFont. Hit OK. We have now our font ready. Now, put this actions in the frame where the text field is (you can also create a text field with action script, i'm gonna do that):
this.createTextField("field_txt",1,2,2,550,50);
field_txt.text="Embed
fonts, any font you like";
style=new TextFormat();
style.font="myFont";
field_txt.setTextFormat(style);
field_txt.embedFonts=true;
Note: it's not necessary to create the text field with action script. If you haven't created your text with action script, the first to lines should be ommited and the instance name of the text field should be "field_txt" (or any other name you want, but remember changing the name in the code every time it says "field_txt")
Here's the explanation of the code:
First to lines creates a textfield and we write something on it. The text MUST be written before we apply the style.
style=new
TextFormat(): we create a new text format called 'style'
style.font="myFont":
we set the font of the new text format. The name must be
between " " and the name has nothing to do with the name that appears in the
library,
the name is the one
we put as identifier.
We could add more things to the style if we want, like bold, size of the text and many other things.
field_txt.setTextFormat(style):
we set our text field the text format we have just defined.
field_txt.embedFonts=true: when we set embedFonts to true, we tell flash to use
the font that it's in the library instead of using device fonts.
And that's it, it was that easy!, hope you enjoy it!