
Page 2 of 2 If your runtime shared library file contains bold and/or italic options with exported font symbols, you can access these styles in HTML text assigned to dynamic text fields, without specifying the full font face name. For example, if you have imported bodyFont and bodyFont-Bold from the runtime shared library, you can simply use <b> tags in string values assigned to the htmlText property of a dynamic text instance. You learn how to do this task in the following steps.
var bodyField:TextField;
var headingField:TextField;
bodyField.html = true;
bodyField.htmlText = "This is HTML text formatted with the bodyFont font, which is a shared font loaded from shared_fonts.swf. The file size of this movie is small--just " + this.getBytesTotal() + " bytes uncompressed--because the font characters are stored in the shared fonts SWF file. You can also access the <b>bodyFont-Bold</b> shared font by using the <b> tag.";

Figure 2 HTML text displayed with the bodyField instance.
You now know how to use shared font symbols with dynamic text fields of other Flash movies. In the next tutorial of this series, you learn how to modify the font symbols of a runtime shared library to enable their use in dynamic text fields created at runtime.
Approximate download size: 166k
Keywords
runtime shared libray, dynamic text, shared font, font symbols