6 Replies Latest reply on Jun 4, 2007 1:25 PM by kglad

    Changing alpha programatically - alpha values not whole numbers

    crownnation
      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?