The TextStyleClass - Embedding Fonts, Formatting Text With A Stylesheet
In this article I describe how to use custom fonts and embed them in a textfield. The class, which I wrote will do that for you. Calling this class you can:
- create a virtual textfield or use one from the movie library in a movieclip;
- position the textfield in the movie;
- set width and height or autosize the textfield;
- embed fonts;
- load an external stylesheet;
- add a UIScrollbar when the textfield is smaller than the loaded text.
We can combine this also with a movie, which contains all the fonts as stringy described on the Flashkit site.
Below is the movie, which has a virtual textfield with embedded fonts. The text source is an XML file.