Copy link to clipboard
Copied
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?
1 Correct answer
if your textfield has reference name tf, use:
tf.background=true;
tf.backgroundColor=0xrrggbb;
Copy link to clipboard
Copied
if your textfield has reference name tf, use:
tf.background=true;
tf.backgroundColor=0xrrggbb;
Copy link to clipboard
Copied
Thanks Kglad. Works if you put quotes around the hex color.
tf.background=true;
tf.backgroundColor="0xrrggbb";
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Would this be different for html5 cancas?
Copy link to clipboard
Copied
it sure would.

