Question
Changing alpha programatically - alpha values not whole numbers
I'm doing alpha changes on an image programatically in an
onEnterFrame method. My code is this simple:
trace(mc1_mc._alpha);
mc1_mc._alpha -= 2;
trace(mc1_mc._alpha);
The output is:
100
97.65625
My question is, how is 100 - 2 = 97.65625? What is going on here? It gives this answer even if I use Math.round() on it. Any ideas?
trace(mc1_mc._alpha);
mc1_mc._alpha -= 2;
trace(mc1_mc._alpha);
The output is:
100
97.65625
My question is, how is 100 - 2 = 97.65625? What is going on here? It gives this answer even if I use Math.round() on it. Any ideas?