_tint
- Started
- Last post
- 5 Responses
- quik
is there a _tint thing like there is _alpha in flashMX?
- 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. :)
- mrdobolina0
or you could just use the drop down box that alpha is in and select tint. nice actionscript tho.
- quik0
which when animating isn't anywhere near as efficent as using AS.
- quik0
oh and thanks :D
- mrdobolina0
Im lost