//This line can be in the timeline or if your using a class, within the class, Not within a function.
[Embed(source='/assets/fonts/NeoSans.ttf', fontName="TheCrazyMan", mimeType="application/x-font-truetype")]
public static var FONT_NEOSANS:Class; //<------------Variable must be static in-order for this to work.
//////////////////////////////////////////////////////TextFormat Creation
var format:TextFormat = new TextFormat();
format.font = "TheCrazyMan";
format.color = "0xB10101";
format.size = 14;
//////////////////////////////////////////////////////Dynamic Text Field
var tf:TextField = new TextField();
tf.embedFonts = true; //<----------------------------embedFonts must be true;
tf.selectable = false;
tf.x = 8;
tf.y = 20;
tf.defaultTextFormat = format; //<-------------------Must be defaultTextFormat;
tf.text = "A new font";
addChild(tf);
//////////////////////////////////////////////////////Text Field already on stage titled testText1
testText1.defaultTextFormat = format;
testText1.text = "A new font";
testText2.embedFonts = true; //<--------------------embedFonts must be true;
testText2.defaultTextFormat = format2; //<-----------Must be defaultTextFormat;
testText2.text = "A new font";
//////////////////////////////////////////////////////If Using AssetManagement Solution
import AssetManager;
public class Main extends MovieClip
{
var FT:Class = AssetManager.FONT_NEOSANS; //<-------Gives access to font in AssetManager class.
public function Main()
{
// Continue with TextFormat and Text Field code above.
}
}