PDA

View Full Version : Selective tinting -help-



iangregory
July 3rd, 2009, 01:43 PM
Hi Everyone,

I have some bitmap characters that I need to tint. They have a black outline. I've figured out how to do -almost- what I want using as3. The problem is that the outline tints too. Does anyone know of a way to exclude the black (or any other color for that matter) outline from tinting other than by copying the outline to another movieclip and overlaying it? There could be thousands of movieclips and that's not practical for what I'm doing.

Thank you in advance,
Ian

iangregory
July 3rd, 2009, 02:37 PM
Got one way figured out. In case anyone is interested just add a copy of the movieclip on top of the one that gets tinted and set it's blendmode to multiply - like:
overlay.blendMode = BlendMode.MULTIPLY;
My bitmaps are greyscale png files with transparency. Multiply works great with them. I guess this wouldn't work so well if my originals were in full color.
Ian

DanielApt
July 5th, 2009, 04:05 AM
Multiple removes the black, so if it would be in colour, and the pictures would have a black border, multiply would still remove it

snickelfritz
July 5th, 2009, 02:36 PM
The colorMatrixFilter is useful for "tinting" objects, while preserving black and grayscale details.

iangregory
July 6th, 2009, 08:15 PM
Thanks for both the replies. I'll check into the colorMatrixFilter. :)