📄 textformatmanage.as
字号:
package com.ninemoon
{
import flash.display.Sprite;
import flash.text.TextFormat;
public class TextFormatManage extends Sprite
{
private static var _textFormat:TextFormat=new TextFormat();
public function TextFormatManage()
{
//_textFormat=new TextFormat();
}
public static function getFormat(str:String):TextFormat
{
var textformat:TextFormat;
switch (str) {
case "format_1" :
textformat=createFormat_1();
break;
case "format_2" :
textformat=createFormat_2();
break;
}
return textformat;
}
private static function createFormat_1():TextFormat
{
_textFormat.size=12;
_textFormat.color=0x7578ab;
_textFormat.font="宋体";
return _textFormat;
}
private static function createFormat_2():TextFormat
{
_textFormat.size=12;
_textFormat.color=0xffffff;
_textFormat.font="宋体";
return _textFormat;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -