Fast black’n'white trick
as3, black'n'white, saturation
Mar 18code, misc1 Comment
Sometimes i need a fast black’n'white saturation method and this one’s the shortest i presume.
I can’t remember whose this method originally was, but it’s nice.
private var rc:Number = 1/3, gc:Number = 1/3, bc:Number = 1/3;
private var sf:ColorMatrixFilter = new ColorMatrixFilter([rc, gc, bc, 0, 0, rc, gc, bc, 0, 0, rc, gc, bc, 0, 0, 0, 0, 0, 1, 0]);
private function blackAndWhite(target:UIComponent, enabled:Boolean):void
{
if(enabled) target.filters = [sf];
else target.filters = [];
}





May 03, 2010 @ 19:36:04
Good information on Fast black’n’white trick | CWi Labs :: jloa's blog . As I have read other online views on the same I think the details are well reflected on this.It was a good way of spending evening on Monday . I’ll visit again to read more on this website and hope to gain more knowledge.