Skip to main content
Known Participant
June 10, 2011
Answered

Adding background color to Dynamic Text boxes

  • June 10, 2011
  • 1 reply
  • 5881 views

Is this possible?  Basically I want to make the background of the Dynamic Text box have a color.  How do I do this using AS3?

This topic has been closed for replies.
Correct answer kglad

if your textfield has reference name tf, use:

tf.background=true;

tf.backgroundColor=0xrrggbb;

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 10, 2011

if your textfield has reference name tf, use:

tf.background=true;

tf.backgroundColor=0xrrggbb;

castrainAuthor
Known Participant
June 10, 2011

Thanks Kglad.  Works if you put quotes around the hex color.

tf.background=true;

tf.backgroundColor="0xrrggbb";

kglad
Community Expert
Community Expert
June 10, 2011

you don't need quotes and, strictly speaking, you shouldn't use quotes.  color is a uint though flash will convert the string to a uint, if it can.