开发者

actionscript 3.0: dynamically load fonts

开发者 https://www.devze.com 2023-01-24 19:51 出处:网络
with actionscript 3.0 it is possible to embed a font in a single swf file. but is it al开发者_如何学Goso possible to load this swf after the main movie has started or do they need to be loaded at the

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

but is it al开发者_如何学Goso possible to load this swf after the main movie has started or do they need to be loaded at the beginning?

thanks!


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消