Here is a more complicated implementation of ColorMatrix Class in conjunction with Tweener in order to get a “_saturation” property of a MovieClip which can then be fully controlled by Tweener (used in this example) - or other Tweening engines.
Here is the sample code (you can download FLA example HERE):
import ColorMatrix;
import caurina.transitions.Tweener;
import flash.filters.ColorMatrixFilter;
MovieClip.prototype.addProperty(”_saturation”, this.getSAT, this.setSAT);
MovieClip.prototype.setSAT = function(sth)
{
this._saturation = sth;
};
MovieClip.prototype.getSAT = function()
{
return this._saturation;
};
example_mc._saturation=0;
example_mc.cm = new ColorMatrix();
example_mc.cm.adjustSaturation(example_mc._saturation-100);
example_mc.filters = [new ColorMatrixFilter(example_mc.cm)];
changeSAT = function(what)
{
//the same as above but in form of a function executed on each Tweener UPDATE (onUpdate 
what.cm = new ColorMatrix();
what.cm.adjustSaturation(what._saturation-100);
what.filters = [new ColorMatrixFilter(what.cm)];
};
// ___________________USAGE
example_mc.onRollOver = function()
{
Tweener.addTween(this,{_saturation:100,time:.4,transition:”easeOutSine”,onUpdate:changeSAT,onUpdateParams:[this]});
};
example_mc.onRollOut = function()
{
Tweener.addTween(this,{_saturation:0,time:.4,transition:”easeOutSine”,onUpdate:changeSAT,onUpdateParams:[this]});
};
the full code available for download is fully commented - here
FLAIM