Posted By

visualadvance on 04/26/11


Versions (?)

AS3: TextField

 / Published in: ActionScript 3

Set the textfield to multiline. Then use this to make it auto expand to multiline.

This code is also good for getting multiple font weights working. - Embed the Regular, Bold, etc font weights - Use for bold and for italic

  1. import flash.text.TextFieldAutoSize;
  2. import flash.text.TextFormat;
  4. dynText.autoSize = TextFieldAutoSize.LEFT;
  5. dynText.htmlText = "Sample Text";
  7. var tf:TextFormat = new TextFormat();
  8. tf.font = "Din Regular";
  9. dynText.setTextFormat (tf);

Report this snippet  

You need to login to post a comment.