Hello I am trying to change and FADE the color of a clip from IT'S ORIGINAL COLOR to red...I have some code but it changes the color to white first then fades it to a grey, and I can't figure out how to tweak it to FADE the color from it's original color to red.
Code:
// movie clip transition
//function to change color of clip
_global.changecolor = function(clip) {
i = 255;
import flash.geom.ColorTransform;
import flash.geom.Transform;
var colorTrans_1:ColorTransform = new ColorTransform(1, 1, 1, 1, i, i, i, 0);
var trans:Transform = new Transform(clip);
trans.colorTransform = colorTrans_1;
clip.onEnterFrame = function() {
if (i>0) {
var colorTrans_1:ColorTransform = new ColorTransform(1, 1, 1, 1, i, i, i, 0);
var trans:Transform = new Transform(clip);
trans.colorTransform = colorTrans_1;
i = i-17;
} else {
delete this.onEnterFrame;
}
};
};
//to call this function
changecolor(movieclip name);