Jump to content


Embedding Fonts using SWFLoader

Recommended Posts

Hi, when using Flashbuilder, I usually embed the fonts using the [EMBED] method, eg:


private var myEmbeddedFont:Class;


I wondered is it possible to export a SWF with the fonts embeddeed in the Library, with Class names. Then call the font via the getClass method. For example, I have a font embedded in fonts.swf called 'ArialFont' :


var FONTS:SWFLoader = LoaderMax.getLoader("fonts");
var _Arial:Class = FONTS.getClass('ArialFont');


Is this possible ?


Many thanks

Link to comment
Share on other sites

Yes, its possible to use getClass() to reference fonts in loaded swfs.

Give it a try. Let us know if you hit any trouble.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.