0
New Here
,
/t5/animate-discussions/changing-dynamic-text-field-color/td-p/403511
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Is it possible to change the color of a dynamic text field
through Actionscript? I'm using 2.0. I know how to change a button
or mc color, but not a text field. The text field is currently
defined as a string. Thanks.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
May 09, 2008
May 09, 2008
The color of the string text displayed can be modified, but
not the color of the string. Strings are pretty much just arrays of
characters... aka data. To view a string on the stage it needs to
be placed in a TextField. The TextField is the place where the
visual attributes of a string are managed (font, size, color, etc).
Textfields have numerous properties, one of which is the text. The text property is assigned the string value that you equate it to.
TextField.text = String
Textfields have numerous properties, one of which is the text. The text property is assigned the string value that you equate it to.
TextField.text = String
LEGEND
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403512#M252110
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Yes it is possible, but what do you want to change, the text
color or the text field background color?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
CowAttack
AUTHOR
New Here
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403513#M252111
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Just the text color. The text background should stay
transparent.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403514#M252112
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Try:
tField.textColor = 0xFF0000; // red text
where tField is whatever instance name you gave to the TextField
tField.textColor = 0xFF0000; // red text
where tField is whatever instance name you gave to the TextField
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
CowAttack
AUTHOR
New Here
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403515#M252113
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
It gives the error: "There is no property with the name
'textColor.'"
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403516#M252114
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
The "tField" in my example is not the text string, it is the
text field instance name. In what you did you are trying to change
the string itself, which does not have a textColor property.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
CowAttack
AUTHOR
New Here
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403517#M252115
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Does a string have anything equivalent to a textColor
property or can its color not be modified?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403518#M252116
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
The color of the string text displayed can be modified, but
not the color of the string. Strings are pretty much just arrays of
characters... aka data. To view a string on the stage it needs to
be placed in a TextField. The TextField is the place where the
visual attributes of a string are managed (font, size, color, etc).
Textfields have numerous properties, one of which is the text. The text property is assigned the string value that you equate it to.
TextField.text = String
Textfields have numerous properties, one of which is the text. The text property is assigned the string value that you equate it to.
TextField.text = String
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
CowAttack
AUTHOR
New Here
,
LATEST
/t5/animate-discussions/changing-dynamic-text-field-color/m-p/403519#M252117
May 09, 2008
May 09, 2008
Copy link to clipboard
Copied
Thanks for your help. This got me where I needed to be.
Awesome!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

