How can I change the color of the font inside of a dynamic text field using Actionscript 3 in Flash? I'd like to implement this into an if-statement, kind of like this:
if (randomVar == 0) {
score.color = #0xFFFFFF;
} else if (randomVar == 1) {
score.color = #0xFAFAFA;
} else {
score.color = #0xAAAAAA;
}
randomVar
is the product ofMath.random()
, it will never produce a value of1
and very very rarely be exactly0
. – BadFeelingAboutThis