WHAT'S NEW?
Loading...

get started with the TLFTextField class in ActionScript in Adobe Flash



import fl.text.TLFTextField;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.x = tlfTxt.y = 20;
addChild(tlfTxt);



import fl.text.TLFTextField;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.wordWrap = true;
tlfTxt.x = tlfTxt.y = 20;
addChild(tlfTxt);



import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.wordWrap = true;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 20;
addChild(tlfTxt);



import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.htmlText = "<p>The <b>quick</b> brown <i>fox</i> jumps <font color='#FF0000'>over</a> the <a href='http://blog.pustakaflash.com/'>lazy</a> dog.";
tlfTxt.wordWrap = true;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 20;
addChild(tlfTxt);



import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
 
var fmt:TextFormat = new TextFormat();
fmt.color = 0xFF0000; // red
fmt.font = "Arial";
fmt.size = 32;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.defaultTextFormat = fmt;
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.wordWrap = true;
tlfTxt.width = 300;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 40;
addChild(tlfTxt);



import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.wordWrap = true;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 40;
tlfTxt.alpha = 0.3;
addChild(tlfTxt);



import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
 
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.text = "The quick brown fox jumps over the lazy dog.";
tlfTxt.wordWrap = true;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 40;
tlfTxt.rotation = 15;
addChild(tlfTxt);



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://blog.pustakaflash.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;
addChild(tlfTxt);

0 komentar:

Post a Comment