ios - how do i add style to a textfield in AS3? -


when press button display text, how add style? such position , color.

import flash.text.textfield;  var tf:textfield= new textfield();   convob.addeventlistener(mouseevent.click, fl_mouseclickhandler);  function fl_mouseclickhandler(event:mouseevent):void {  tf.text="hello world";   addchild(tf);  } 

something this:

var format:textformat = new textformat(); format.color = 0x555555; format.size = 18; format.align = textformatalign.center; format.bold = false; tf.settextformat(format); 

check class reference textformat: http://help.adobe.com/en_gb/flashplatform/reference/actionscript/3/flash/text/textformat.html


Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -