O'Reilly logo

Flash 8 Cookbook by Joey Lott

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

11.4. Adjusting Movie Clip Instance Color

Problem

You want to adjust the color of a movie clip instance.

Solution

Select the Tint option from the Color Styles menu in the Property inspector, and modify the red, green, and blue values as well as the tint amount.

Alternatively, use an ActionScript ColorTransform object to modify the color at runtime.

Discussion

You can adjust the tint on each movie clip instance individually, creating unique colors for each, even though they are all derived from a common library symbol. This can be a powerful technique for creating variations on a single movie clip instance.

At authoring time, you can modify an instance’s color settings from the Property inspector:

  1. Select the instance on the stage.

  2. Open the Property inspector, locate the Color Styles menu, and select the Tint option.

  3. Adjust the available settings:

    • Set the red, green, and blue color values individually, or choose a color from the color selector. These settings affect the tint of the color to apply to the instance.

    • Choose a value for the Tint Amount. The valid range is from 0% to 100%.

When you apply a tint to a movie clip instance, Flash modifies each of the instance’s color values relative to their original value. The result is a tint, rather than a fill effect. In other words, if the movie clip instance originally had blue, orange, and yellow colors within it, and you apply a red tint to it, the blue, orange, and yellow values become redder. How much redder the colors become depends on the value ...

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