Mega Code Archive

 
Categories / Flash ActionScript / TextField
 

Interactions between the text and htmlText variables

package{   import flash.display.Sprite;     import flash.text.*;   public class Main extends Sprite{     public function Main(){         var t:TextField = new TextField(  );         t.htmlText = '<P ALIGN="LEFT">' +             + '<FONT FACE="Times New Roman" SIZE="12" COLOR="#000000" '             + 'LETTERSPACING="0" KERNING="0">This field contains <B>HTML!</B>'             + '</FONT></P>';         addChild(t);     }   } }