Ever wanted to tween ColorTransform properties of a DisplayObject to do advanced effects like overexposing, altering
the brightness or setting the percent/amount of tint? Or maybe tween individual ColorTransform
properties like redMultiplier, redOffset, blueMultiplier, blueOffset, etc. ColorTransformPlugin gives you an easy way to
do just that.
PROPERTIES:
tint (or color) : uint
- Color of the tint. Use a hex value, like 0xFF0000 for red.
tintAmount : Number
- Number between 0 and 1. Works with the "tint" property and indicats how much of an effect the tint should have. 0 makes the tint invisible, 0.5 is halfway tinted, and 1 is completely tinted.
brightness : Number
- Number between 0 and 2 where 1 is normal brightness, 0 is completely dark/black, and 2 is completely bright/white
exposure : Number
- Number between 0 and 2 where 1 is normal exposure, 0, is completely underexposed, and 2 is completely overexposed. Overexposing an object is different then changing the brightness - it seems to almost bleach the image and looks more dynamic and interesting (subjectively speaking).
redOffset : Number
greenOffset : Number
blueOffset : Number
alphaOffset : Number
redMultiplier : Number
greenMultiplier : Number
blueMultiplier : Number
alphaMultiplier : Number
USAGE:
import com.greensock.TweenLite;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.ColorTransformPlugin;
TweenPlugin.activate([ColorTransformPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
TweenLite.to(mc, 1, {colorTransform:{tint:0xFF0000, tintAmount:0.5}});
Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in
http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.