ActionScript 3 简单的TextFormat Manager AS3
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 简单的TextFormat Manager AS3相关的知识,希望对你有一定的参考价值。
package com.leongaban.Snipplr.Model
{
import flash.text.Font;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.text.TextFieldAutoSize;
import flash.text.*;
public class Fonts
{
public static var data:Object = {};
public static var customFormat1 = new TextFormat();
public static var customFormat2 = new TextFormat();
customFormat1.font = "Arial";
customFormat1.size = 14;
customFormat1.bold = true;
customFormat1.color = 0x000000;
customFormat1.align = TextFormatAlign.LEFT;
customFormat2.font = "Arial";
customFormat2.size = 11;
customFormat2.bold = false;
customFormat2.color = 0x000000;
customFormat2.align = TextFormatAlign.LEFT;
}
}
// How to use in other Classes:
/*videoTitle.defaultTextFormat = Fonts.customFormat1;
videoTitle.border = false;
videoTitle.embedFonts = false;
videoTitle.selectable = false;
videoTitle.mouseEnabled = false;
videoTitle.x = 5;
videoTitle.y = 8;
videoTitle.width = titleSize;
videoTitle.height = 30;
videoTitle.text = titleString;
addChild(videoTitle);*/
以上是关于ActionScript 3 简单的TextFormat Manager AS3的主要内容,如果未能解决你的问题,请参考以下文章
ActionScript 3 简单的广场
ActionScript 3 简单的小装载工具
ActionScript 3 简单的大奖老虎机脚本
ActionScript 3 带缓存的简单加载管理器
ActionScript 3 简单的单身人士模板
ActionScript 3 简单的RegEx