Return to Snippet

Revision: 23303
at February 3, 2010 13:50 by Ether

Initial Code
// Create a new instance of the Font1 symbol from the document's library.
var myFont:Font = new Font1();

/* Create a new TextFormat object, and set the font property to the myFont
   object's fontName property. */
var myFormat:TextFormat = new TextFormat();
myFormat.font = myFont.fontName;
myFormat.size = 24;

/* Create a new TextField object, assign the text format using the 
   defaultTextFormat property, and set the embedFonts property to true. */
var myTextField:TextField = new TextField();
myTextField.autoSize = TextFieldAutoSize.LEFT;
myTextField.defaultTextFormat = myFormat;
myTextField.embedFonts = true;
myTextField.text = "The quick brown fox jumped over the lazy dog.";

Initial URL

Initial Description

Initial Title
Embedding fonts in ActionScript 3

Initial Tags

Initial Language
ActionScript 3