actionscript 3 - Vertical align text As3 Label Coponent -


i have simple question, possible vertical align text displayed label component in flash cs6.

only tlftextfield (class in package fl.text) has built-in property set text vertical alignment.

go this page more information

unfortunately in as3 labels limited in can - use setstyle property of label reference predefined textformat still textformat lacks appropriate public properties relevant question.

so advise use textfield replacement label's text option can manipulate programatically so:

    var label1:textfield = new textfield();                 label1.y = 100; // value here vertical text alignment                 label1.width = 100; // height                 label1.height = 100; // height                 label1.text = "label 1 text"; // label text here                 addchild(label1); // adds stage 

edit: added addchild - totally forgot!

here simple tutorial as3 textfields


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -