To completely desaturate a display object you can do:

var t:Number = 1/3;
var c = new ColorMatrixFilter([t, t, t, 0, 0,
                               t, t, t, 0, 0,
                               t, t, t, 0, 0,
                               0, 0, 0, 1, 0]);
displayObject.filters = [c];


HTH :)

Stuart

-----Original Message-----
From: Andrew Kirkham [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 10:24 AM
To: [email protected]
Subject: [Flashcoders] Transforming a MovieClip instance to monochrome

Is there a way of transforming a coloured MovieClip instance to monochrome
(specifically grey scale) at run time? I want it to indicate that a control
is disabled.

It seems a fairly elementary thing to do, so possibly I'm overlooking
something quite obvious.

The ColorTransform class seems a likely method, but I'm not very
knowledgable about the intricacies manipulating RGB values, and although
I've spent some time adjusting various values I haven't acheived the result
I want.

Regards
Andy KIrkham
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to