Align Text in the TextField using ActionScript 3 in Flash Professional

 

Align Text in the TextField in ActionScript 3 little different than using ActionScript 2. Here is the list of samples to align text in the TextField using  ActionScript 3.

var txt:TextField= new TextField;

txt.text=”happy morning”;

txt.autoSize = TextFieldAutoSize.LEFT;

addChild(txt);

The above text in the TextField align towards left side.

here is the list other align methods

 

TextFieldAutoSize.NONE (default):
TextFieldAutoSize.LEFT:
TextFieldAutoSize.CENTER:
TextFieldAutoSize.RIGHT:

Subscribe to get all tutorial updates, promotional offers and download links for all tutorials via E-Mail

Enter your email address:



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">