Hey there,
So I only found out what prototypes are this morning! And I got a couple working, but I can’t work out how to apply this one from robertpenner.
[AS]//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
[/AS]
I have tried;
myMC.Color.setTint(120,0,0,60);
and also
myMC.color.setTint(120,0,0,60);
but neither work
Can anyone help?
Thanks