This content has been marked as final. Show 4 replies
flash stores the _alpha property internally as an integer between 0 and 255.
normally, the conversion doesn't cause a problem. but when you repeatedly increment or decrement the _alpha of a movieclip the errors can accumulate.
to remedy use a variable to store the _alpha value of your movieclip. update that variable's value and assign your movieclip's _alpha to be the value of the variable.
Thanks. I tried doing that before as a way to fix it, just did a "this.alphavalue" and alter that instead. Seems to work okay!
Thanks for the advice :-)
> flash stores the _alpha property internally as an integer between 0 and
Actually .. it stores that value as an integer between 0 and 256; where 0 =
0% alpha and 256 = 100% alpha. That's why you can get accurate results with
(say) 50% (which translates exactly to an internal value of 128.
I know why you might thing it should be 255 .. but its not :)
Other than that, your explanation was correct :)
that is strange. but yes, the _alpha stored by flash is the same as one would expect when the _alpha is 100*i/256; for some integer i = 0,...,256.