You can use a color matrix like this:

// Flash Imports
import flash.filters.ColorMatrixFilter;

var greys:Array =       [
                                                0.3086,0.6094,0.082,0,0,
                                                0.3086,0.6094,0.082,0,0,
                                                0.3086,0.6094,0.082,0,0,
                                                0,0,0,1,0
                                        ];
var greyscale:ColorMatrixFilter;
greyscale = new ColorMatrixFilter(greys);
var tmp:MovieClip;
tmp = someClip_mc;
tmp.filters = [greyscale];

setGreyScaleColor(tmp, greyscale, "greyscale");

function setGreyScaleColor(theClip:MovieClip, theColor, filterType:String)
{
        theClip.filters = [theColor];
        this.filterType = filterType;
}

So there you have it :)

Sid

On Mar 18, 2008, at 3:40 AM, laurent wrote:

Hi,

What would you suggest to make an image go from color to black and white ?

thanks.
Laurent
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to