I want to change a movie clip’s tint once a button event occurs, and I can’t seem to figure it out. I have looked at Kirupa’s color changing tutorial but it does not apply to tinting.
I found this through a google search but I’m not entirely sure how to use it.
//tint an object with a color just like Effect panel
//r, g, b between 0 and 255; amount between 0 and 100
Color.prototype.setTint = function (r, g, b, amount) {
var percent = 100 - amount;
var trans = new Object();
trans.ra = trans.ga = trans.ba = percent;
var ratio = amount / 100;
trans.rb = r * ratio;
trans.gb = g * ratio;
trans.bb = b * ratio;
this.setTransform(trans);
}//Robert Penner June 2001 - www.robertpenner.com