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:
Select the instance on the stage.
Open the Property inspector, locate the Color Styles menu, and select the Tint option.
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 ...
Get Flash 8 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.