_tint
_tint
Out of context: Reply #1
- Started
- Last post
- 5 Responses
- nonakedflame0
frame 1 - on main timeline...
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);
}usage -
// tint to grey
tinted = new Color(MCname);
tinted.setTint ( 100,100,100,50 )// tint back to normal
tinted = new Color(MCname);
tinted.setTint ( 0,0,0,0 )note : first 3 numbers of set tint are R,G,B values... and the last one is the Alpha.
Go here for the original prototype...
made by Robert Penner
hope this helps...
NNF. :)