0
votes

with actionscript 3.0 it is possible to embed a font in a single swf file.

but is it also possible to load this swf after the main movie has started or do they need to be loaded at the beginning?

thanks!

1
This is possible. Check this blog entry out for more details.Piotr
thanks, btw do you if there is a way to determine when a textfield is used which font has not been loaded yet?clamp
You could implement some sort of font manager to keep track of which fonts you have loaded.Piotr

1 Answers

0
votes

The easiest thing is to embed them in a stylesheet (.css)

@font-face {
    src: url("../assets/MyriadWebPro.ttf");
    fontFamily: myFontFamily;
}

(http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html)

Compile it separately (in Flash Builder, right-click the .css and select Compile CSS to SWF), and load it when you need it (StyleManager.loadStyleDeclarations)