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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

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

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -