TextField formatting?

How to change the formatting of the textfield e.g. font

Page 1 of 1

1 Replies - 987 Views - Last Post: 31 October 2009 - 11:45 AM

#1 lht001300000   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 31-August 09

TextField formatting?

Posted 31 October 2009 - 10:44 AM

i created a dynamic textfield and the text there appears tooo small to actually see it
var mytextbox:TextField = new TextField;
mytextbox.multiline = false;
mytextbox.type = TextFieldType.DYNAMIC;

mystring contains the phrases that i want to display, it is loaded externally.
how to apply style to this textfield??like the options that can be chosen at the "properties", and am I be able to apply this style to other textfield that is created later?

Is This A Good Question/Topic? 0
  • +

Replies To: TextField formatting?

#2 thehat   User is offline

  • awake ? web();
  • member icon

Reputation: 106
  • View blog
  • Posts: 951
  • Joined: 28-February 08

Re: TextField formatting?

Posted 31 October 2009 - 11:45 AM

You need to create a TextFormat object to store all the text settings. Have a read of this: TextFormat

Make sure that you apply the textformat to your textfield after you assign the text, otherwise it won't work. Also, if you're using a font that isn't available to every user like Arial, then make sure you embed your font or it will render strangely:
mytextbox.embedFonts = true;

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1