HERE IS AN EXAMPLE
////////////////////////////////////////////////////////////////////////
////
import flash.filters.ColorMatrixFilter;
/**************** COLOR MATRIX APPLY GRAYSCALE ****************/
private function applyGrayScale(item:MovieClip):Void{
//color matrix array
var grayScale_array:Array = [0.3, 0.59, 0.11, 0, 0,0.3,
0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0, 0, 0, 1, 0];
//create new color matrix
var myColorMatrix_filter:ColorMatrixFilter = new
ColorMatrixFilter(grayScale_array);
//apply filter
item.filters = [myColorMatrix_filter];
};
/**************** COLOR MATRIX APPLAY COLOR ****************/
private function applyColor(item:MovieClip):Void{
//color matrix array
var fullColor_array:Array =
[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];
//create new color matrix
var myColorMatrix_filter:ColorMatrixFilter = new
ColorMatrixFilter(fullColor_array);
//apply filter
item.filters = [myColorMatrix_filter];
};
/////////////////////////////////////////////////////////////////
-----Original Message-----
From: Ryan Matsikas [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 2:02 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Adjust Color Bitmap by Script is possible?
also, http://www.gskinner.com/blog/archives/2005/09/flash_8_source.html
On 1/23/06, Ralph Caraveo <[EMAIL PROTECTED]> wrote:
>
> I don't think there's a straight code implementation of this via code
> but it can be done no problem using the ColorMatrix filter class.
Check
> out Quasimondo's blog for some examples on how to do this using the
> ColorMatrix class. It's pretty in depth stuff but once you get it
> working it's pretty awesome:
> http://www.quasimondo.com/search.php?q=colorMatrix
>
> -Ralph
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Christian Pugliese
> Sent: Monday, January 23, 2006 11:49 AM
> To: [email protected]
> Subject: [Flashcoders] Adjust Color Bitmap by Script is possible?
>
> Anyone knows if it's possible to apply the bitmap filter 'Adjust
Color'
> via AS ? and how?
>
>
> cheers
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders