/ 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
Expand |
Embed | Plain Text
import flash.text.TextFieldAutoSize; import flash.text.TextFormat; dynText.autoSize = TextFieldAutoSize.LEFT; dynText.htmlText = "Sample Text"; var tf:TextFormat = new TextFormat(); tf.font = "Din Regular"; dynText.setTextFormat (tf);
You need to login to post a comment.
