I have lots of images and i need to put a pinkish colour
filter on them....The problem i'm having is i can put a layer of
50% alpha pink infront of the image but then it's much lighter than
i want as it's half transparent. So I'd like to do a kind of
photoshop multiplier effect where i merge the pink with the image.
Is there a way to do this in as3?
I've seen merge, using bitmapData but i can't work out how to
get it relate an loaded in image. Also i've seen the blendmode on
movieclips but i can't seem to get anywhere with that.
Any ideas anyone?
Thanks in advance
GregConnTelevirtual, Mar 4, 2009 4:20 AM
I've tried that and got nowhere. I'm trying to change the
colours or merge the colours in an image that has been loaded in.
Not a standard movieclip object. I need to change the actual
bitmapdata but i'm not sure how.
B1 is 177 which works out as 177/255 = 0.6941
17 is 23 which works out as 23/255 = 0.0902
47 is 71 which works out as 177/255 = 0.2784
you divide the number by 255 as teh decimal range is 0-255
var bmp:Bitmap = myLoader.content;
bmp.smoothing = true;
var mc:MovieClip = new MovieClip();
//add bitmap to movieclip
//build array and concat the colours
var matrix:Array = new Array();
matrix = matrix.concat([0.6941, 0, 0, 0, 0]); // red
matrix = matrix.concat([0, .0902, 0, 0, 0]); // green
matrix = matrix.concat([0, 0, .2784, 0, 0]); // blue
matrix = matrix.concat([0, 0, 0, 1, 0]); // alpha
//apply the filter
function applyFilter(child:DisplayObject, matrix:Array):void
var filter:ColorMatrixFilter = new
var filters:Array = new Array();
child.filters = filters;