i am trying Lee Brimelow’s tutorial about Runtime Font Loading from here: http://gotoandlearn.com/files/runtimefonts.zip
there are 2 fla files (flash cs4 needed).
in one is this code:
[Embed(systemFont="Impact", fontName="impact",
mimeType="application/x-font", unicodeRange="U+0041-U+005A")]
var impact:Class;
Font.registerFont(impact);
and in the other (which loads the previous swf):
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fontLoaded);
loader.load(new URLRequest("impact.swf"));
function fontLoaded(e:Event):void
{
var tf:TextField = new TextField();
tf.width = 600;
tf.embedFonts = true;
tf.defaultTextFormat = new TextFormat("Impact", 60, 0x000000);
tf.text = "RUNTIME FONTS";
addChild(tf);
}
his example works fine, but if i try to substitute any other font from my pc i get nothing when i run other swf file.
i dont get , why doesnt it work?