关于TLF文本的应用

一直不曾去了解这个文本的作用,今天收藏一点。

import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
var tFlow:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontFamily='Arial' fontSize='24'><p>The <span fontStyle='italic'>quick</span> <span 
fontWeight='bold'>brown</span> <span lineThrough='true'>fox</span>
 <span color='#FF0000'>jumps</span> <span baselineShift='superscript'>over</span> <span typographicCase='uppercase'>the</span> <a href='http://actionscriptexamples.com/'>lazy</a> dog.</p></TextFlow>";
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.tlfMarkup = tFlow;
tlfTxt.wordWrap = true;
tlfTxt.width = 300;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 40;
tlfTxt.alpha=0.3;
tlfTxt.rotation =45;
addChild(tlfTxt);

  

你可能感兴趣的:(应用)