ActionScript 3 AS3 TextHandle Util - TextField变得简单
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 AS3 TextHandle Util - TextField变得简单相关的知识,希望对你有一定的参考价值。
package {
import flash.text.TextField;
import flash.text.AntiAliasType;
import flash.text.Font;
import flash.text.GridFitType;
import flash.text.TextFieldAutoSize;
import flash.text.TextFieldType;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
public class TextHandle extends TextField{
private var _format:TextFormat;
public function TextHandle(_label:String, _size:uint = 11, _color:uint = 0xFFFFFF) {
_format = new TextFormat();
_format.font = "Verdana";
_format.color = _color;
_format.size = _size;
_format.align = TextFormatAlign.LEFT;
this.embedFonts = false;
this.antiAliasType = AntiAliasType.ADVANCED;
this.autoSize = TextFieldAutoSize.LEFT;
this.multiline = false;
this.cacheAsBitmap = true;
this.selectable = false;
this.text = _label;
this.defaultTextFormat = _format;
this.setTextFormat(_format);
}
public function get format():TextFormat{
return _format;
}
public function refresh():void{
this.setTextFormat(_format);
}
}//end
}
以上是关于ActionScript 3 AS3 TextHandle Util - TextField变得简单的主要内容,如果未能解决你的问题,请参考以下文章
[ActionScript 3.0] AS3.0 水面波纹效果
ActionScript 3 AS3:使用SWFObject2和AS3传递变量
ActionScript 3 克隆数组(AS3)
ActionScript 3 AS3序列化
ActionScript 3 As3初始上限
ActionScript 3 AS3 HTML清理