?? 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 + -