reverse colortransform alpha AS3
Posted
by Chris Porter
on Stack Overflow
See other posts from Stack Overflow
or by Chris Porter
Published on 2010-01-04T12:13:48Z
Indexed on
2010/05/20
19:50 UTC
Read the original article
Hit count: 331
I'm fading out a Bitmap in AS3 by repeatedly applying a ColorTransform every frame to its BitmapData;
_bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, .9, 0, 0, 0, 1));
When applying the apparent reverse to fade it back in I get a discoloured image.
_bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, 1.1, 0, 0, 0, 1));
The problem appears to occur only to fully faded-out images. If I only go part way it is recoverable.
fading out:
faded back
© Stack Overflow or respective owner