Make your own free website on Tripod.com
Color animation
ericlin@ms1.hinet.net

download zipped fla

The color band is a bitmap fetched from graphic software. I use the function described in the previous session to get the color where the mouse pointer clicks.

When we do color fade-in and fade-out, it is better to separatively fade-in and fade-out of the three elements r,g,b; Imaging a red color 0xFF0000 fades to 0x000000; If we fade it each frame by 0x010000 that is all right, the color value will go as 0xFE0000 ->0xFD0000 -> 0xFC0000 ..........; But if we fade it by some arbituray value, like 0x010001, then the color value in the next frame will be contain some blue and green value. So, we got to fade r, fade g, fade b and combine them together.

Note:Pure red color animates into pure blue color will have purple color as intermediate color during animation. Purple color animates into green color will have an intermediate color of grey color.