Welcome back to my tutorial series on 2D dynamic shadows. In this article I'm going to explain what blend modes are available in flash, and what each of the blend modes does. Why blend modes? They are extrememly useful for controlling the color of pixels and as you'll see, crucial to my shadow implementation( I'll go into that detail in a later article, where we are going to examine which blend modes are useful to create shadows. ) Some of the following information is gleaned from wikipedia, some from random websites. The accompanying image to each blend mode is representation of how the blend mode looks when combining against two different images. Top left is original image while top right is blended with a gradient using the appropriate blend mode. Bottom right( I know, reveresed... ) is the gradient on its own while bottom left is it blended with a flat grey color( 0x666666. ) I'm going to discuss their usefulness as a filter for image manipulation, the specific formula that is involved and how it affects the end result.

One thing to keep in mind with all blend modes: The formula( or an optimized version of it ) is perfomed on each pixel to be blended! That means that an ADD blend will take less of your frame than an OVERLAY blend. However, since flash executes all of its code on the CPU, you are more often than not bottlenecked by pixel fill rates than anything else. Still, its worth remembering if performance is required.

A final note before I get right into it; my represenation for color here is in the form of RGB with 0-255 as possible values for each. To make a compatible flash color, this can be packed into an unsinged int using:
Color = r << 16 | g << 8 | b;

Read more here!