MC Tween: it saves the world.™

Home | Using MC Tween | Documentation | AS2 usage notes | Animation Types | Downloads | Examples | Extensions | Author & Disclaimer | Links

.colorTo()

Applies To

MovieClip, TextField

Availability

Flash 6 and above, using AS1 or AS2.

Usage

<MovieClip|TextField>.colorTo(color [, seconds, animation type, delay, callback, extra1, extra2]);

Parameters

color : Desired color for tinting, in numeric value. This numeric value works similarly to the Color.setRGB color parameter. If the value on this parameter is null, it removes whichever tinting the object has (MovieClips only).

All other parameters are standard tween() related. Refer to the .tween() command for reference.

Returns

Nothing.

Description

Shortcut method; does a tinting transition on a MovieClip or set a TextField's textColor parameter. The object's _alpha value is not changed when this method is executed.

Examples

// Tints a MovieClip to #ffb1b2 on 0.5 seconds using a linear transition
<MovieClip>.colorTo(0xffb1b2, 0.5, "linear");

// Removes all tinting aplied to a MovieClip in 1 second
<MovieClip>.colorTo(null, 1);

// Changes a TextField's color to #ff0023 in 2 seconds
<TextField>.colorTo(0xff0023, 2);

See Also

colorTransformTo(), Color.setRGB()

MC Tween· Zeh Fernando, 2003-2006 · Proudly hosted at DreamHost · Disclaimer