Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can apply color effects using ActionScript in multiple ways, and we’ll look at three. The first is relatively straightforward: Alter the emphasis of individual color channels (red, green, blue, and alpha) in an image using the ColorTransform class. The second is a more powerful technique that uses the ColorMatrixFilter to apply a detailed matrix to simultaneously change all color and alpha channels. The last method discussed is the simplest, using the Color class to apply a tint to a display object.
Although we’ll focus exclusively on color, you can use the ColorTransform class to adjust the alpha channel as well as the individual color channels of a display object or BitmapData object. In the examples that follow, we’ll be using the class to invert an image (create a color negative) and apply a simple saturation effect.