O'Reilly logo

ActionScript 2.0 Language Reference for Macromedia® Flash® 8 by Shimul Rahim, Robert L. Dixon, Jen deHaan, Francis Cheng

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ColorTransform (flash.geom.ColorTransform)

Object
  |
  +-flash.geom.ColorTransform

public class ColorTransform
extends Object

The ColorTransform class lets you mathematically adjust all of the color values in a movie clip. The color adjustment function or color transformation can be applied to all four channels: red, green, blue, and alpha transparency.

When a ColorTransform object is applied to a movie clip, a new value for each color channel is calculated like this:

  • New red value = (old red value * redMultiplier) + redOffset

  • New green value = (old green value * greenMultiplier) + greenOffset

  • New blue value = (old blue value * blueMultiplier) + blueOffset

  • New alpha value = (old alpha value * alphaMultiplier) + alphaOffset

If any of the color channel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required