MovieClip._alpha


To implement _alpha change is a hard work for CPU. It get to calculate each interaction between overlapped pixels rgb. To make clip invisible, just make it _visible=false or _x=-5000; It is not good to make _alpha=0; just for hiding. The worst script is to stack 10 images piling together and set all images _alpha=0 except the desired one. 

The basic _alpha unit:100/256

From invisible to fully visible, the _alpha value contains 100 steps. However, the true _alpha effects only has 256 steps. So, the basic unit of _alpha is 100/256 ==>0.390625; 

If we set 
_alpha=0.1; trace(_alpha); //The output will be 0;
_alpha=0.4; trace(_alpha);// The output will be 0.390625;

The script below will passby the If()

this.onEnterFrame=function(){
    _alpha-=10;
    trace(_alpha)
    if(_alpha==20){trace("OK, stop it");}
}


Here is the _alpha value:

100
89.84375
79.6875
69.53125
59.375
49.21875
39.0625
28.90625
18.75
8.59375
-1.171875
-10.9375
-20.703125
..........

It will never get an _alpha value as 20;

The limit of _alpha value:

It is strange that, valid _alpha value is between 0~100, but Flash permit an _alpha value of negative value or a value larger than 100; It does not constrain the _alpha value as _rotation. When _alpha value is larger than 100, it is fully visible. When it is less than 0, it is fully transparent.

Is there a limit ?

The number is 12800; When it is larger than 12800, it get over-flow and suddenly positive turn to negative -12800 and -12800 suddenly turns to 12800; The number is large enough. However, if we let it go, the invisible one will suddenly visible and the visible one will suddenly transparent.