ActionScript 3 在Flash AS3中嵌入抗锯齿字体

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 在Flash AS3中嵌入抗锯齿字体相关的知识,希望对你有一定的参考价值。

// To use this method you must embed and "Export for AS" the font in the Flash IDE (eg. Flash CS3, Flash CS4).
// You Can do this by clicking the menu on the library panel, then go "New Font"
// Then select "Export for Actionscript, and give your font class name.
// The class name is the name that you will reference on the line directly below this.

var myFont = new MyFontClassName();

var myFormat:TextFormat = new TextFormat();
myFormat.size = 40;
myFormat.font = myFont.fontName;

var myText:TextField = new TextField();
myText.defaultTextFormat = myFormat;
myText.embedFonts = true;
myText.antiAliasType = AntiAliasType.ADVANCED;
myText.autoSize = "left";
myText.text = "Here is some pretty that is anti-aliased!";
addChild(myText);

以上是关于ActionScript 3 在Flash AS3中嵌入抗锯齿字体的主要内容,如果未能解决你的问题,请参考以下文章

ActionScript 3 Flash AS3 SharedObject

ActionScript 3 条件速记Flash AS3

ActionScript 3 cerrar aplicacion flash as3

ActionScript 3 AS3 flash.system.Capabilities属性

ActionScript 3 使用AS3从Flash触发Javascript

ActionScript 3 简单的Flash AS3画廊/幻灯片