Recipe 10.3.
Resetting Color
Problem
You want to reset the color of a display object
back to the default.
Solution
Assign a new ColorTransform object with
default values to the transform.colorTransform property of the
display object.
Discussion
The default values of a
flash.geom.ColorTransform object will reset the color of a
display object. You can construct a ColorTransform object
with default values by calling the constructor with no parameters.
The following example resets the color settings for
sampleSprite:
sampleSprite.transform.colorTransform = new ColorTransform( );
See Also
Recipes 10.1
and 10.2
|