在Flash中清除文本
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Flash中清除文本相关的知识,希望对你有一定的参考价值。
note to self - Basic settings for clean text in as3 flash project assuming fonts are embedded.
private function set_text(_txt:String, _size:Number, _font:String, _width:Number=250, txt_color:uint = 0x00CADF ):TextField{ var txt:TextField = new TextField(); var fmt:TextFormat = new TextFormat(); fmt.font = _font; fmt.size = _size; fmt.leading = 1.5; fmt.kerning = true; fmt.color = txt_color; txt.embedFonts = true; txt.defaultTextFormat = fmt; txt.multiline = true; txt.wordWrap = true; txt.antiAliasType ='advanced'; txt.width = _width; txt.autoSize = 'left'; txt.text = _txt; return txt ; }
以上是关于在Flash中清除文本的主要内容,如果未能解决你的问题,请参考以下文章