<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Convert an Image to Black and White with AS3</title>
	<atom:link href="http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/</link>
	<description>Resources, tutorials , tips &#38; tricks for RIA : Flex, Flash, Air, AS3</description>
	<lastBuildDate>Thu, 11 Mar 2010 05:44:18 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Janidu</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-866</link>
		<dc:creator>Janidu</dc:creator>
		<pubDate>Thu, 11 Feb 2010 06:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-866</guid>
		<description>@ Kelly i had the same problem, I copied the AS scripts from CS 4 ;) ...</description>
		<content:encoded><![CDATA[<p>@ Kelly i had the same problem, I copied the AS scripts from CS 4 <img src='http://www.riacodes.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: projektowanie wnętrz wrocław</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-846</link>
		<dc:creator>projektowanie wnętrz wrocław</dc:creator>
		<pubDate>Thu, 04 Feb 2010 23:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-846</guid>
		<description>thanks! i tried dat, works perfect for me!</description>
		<content:encoded><![CDATA[<p>thanks! i tried dat, works perfect for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uberVU - social comments</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-842</link>
		<dc:creator>uberVU - social comments</dc:creator>
		<pubDate>Thu, 04 Feb 2010 23:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-842</guid>
		<description>&lt;strong&gt;Social comments and analytics for this post...&lt;/strong&gt;

This post was mentioned on Twitter by ActiveDen: Convert an Image to Black and White with AS3 http://bit.ly/3xchpD...</description>
		<content:encoded><![CDATA[<p><strong>Social comments and analytics for this post&#8230;</strong></p>
<p>This post was mentioned on Twitter by ActiveDen: Convert an Image to Black and White with AS3 <a href="http://bit.ly/3xchpD.." rel="nofollow">http://bit.ly/3xchpD..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Best of 2009 in Flash Web Design - Flash Web Design and Design Photography &#124; DesignOra</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-704</link>
		<dc:creator>The Best of 2009 in Flash Web Design - Flash Web Design and Design Photography &#124; DesignOra</dc:creator>
		<pubDate>Wed, 30 Dec 2009 12:27:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-704</guid>
		<description>[...] Convert an Image to Black and White  link [...]</description>
		<content:encoded><![CDATA[<p>[...] Convert an Image to Black and White  link [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-700</link>
		<dc:creator>Kelly</dc:creator>
		<pubDate>Tue, 29 Dec 2009 07:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-700</guid>
		<description>my god, I can&#039;t find a fl.motion.AdjustColor class, because i still use CS3.

so , what can I do?</description>
		<content:encoded><![CDATA[<p>my god, I can&#8217;t find a fl.motion.AdjustColor class, because i still use CS3.</p>
<p>so , what can I do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cocey</title>
		<link>http://www.riacodes.com/flash/convert-an-image-to-black-and-white-with-as3/comment-page-1/#comment-524</link>
		<dc:creator>cocey</dc:creator>
		<pubDate>Sun, 15 Nov 2009 21:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.riacodes.com/?p=965#comment-524</guid>
		<description>Thx a lot.

i use it with Tween class like this

import fl.transitions.easing.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import flash.filters.ColorMatrixFilter;
import fl.motion.AdjustColor;

var color:AdjustColor;
var colorMatrix:ColorMatrixFilter;
var matrix:Array;
var filterBW:Array;
var saturation = 0;
var brightness = 0;
var contrast = 0;


image_mc.addEventListener(MouseEvent.MOUSE_OVER,over);
image_mc.addEventListener(MouseEvent.MOUSE_OUT,out);

function over(e:MouseEvent):void {
	var t:Number = 2;
	var tw_over:Tween = new Tween(image_mc,&quot;x&quot;,Strong.easeIn,image_mc.x, image_mc.x, t,true);
	tw_over.addEventListener(TweenEvent.MOTION_CHANGE, function(e){
		if(saturation&gt;-100){
			saturation = -e.currentTarget.time*100/t;
			color = new AdjustColor();
			color.brightness=0;
			color.contrast=0;
			color.hue=0;
			color.saturation=saturation;
			matrix=color.CalculateFinalFlatArray();
			colorMatrix=new ColorMatrixFilter(matrix);
			filterBW=[colorMatrix];
			image_mc.filters=filterBW;
		}
	});
}
function out(e:MouseEvent):void {
	var t:Number = 2;
	var tw_out:Tween = new Tween(image_mc,&quot;x&quot;,Strong.easeIn,image_mc.x, image_mc.x, t,true);
	tw_out.addEventListener(TweenEvent.MOTION_CHANGE, function(e){
		if(saturation&lt;0){
			saturation = (e.currentTarget.time*100/t) - 100;
			color = new AdjustColor();
			color.brightness=0;
			color.contrast=0;
			color.hue=0;
			color.saturation=saturation;
			matrix=color.CalculateFinalFlatArray();
			colorMatrix=new ColorMatrixFilter(matrix);
			filterBW=[colorMatrix];
			image_mc.filters=filterBW;
		}
	});
	tw_out.addEventListener(TweenEvent.MOTION_FINISH, function(){
		image_mc.filters=[];
		saturation = 0;
	});
}</description>
		<content:encoded><![CDATA[<p>Thx a lot.</p>
<p>i use it with Tween class like this</p>
<p>import fl.transitions.easing.*;<br />
import fl.transitions.Tween;<br />
import fl.transitions.TweenEvent;<br />
import flash.filters.ColorMatrixFilter;<br />
import fl.motion.AdjustColor;</p>
<p>var color:AdjustColor;<br />
var colorMatrix:ColorMatrixFilter;<br />
var matrix:Array;<br />
var filterBW:Array;<br />
var saturation = 0;<br />
var brightness = 0;<br />
var contrast = 0;</p>
<p>image_mc.addEventListener(MouseEvent.MOUSE_OVER,over);<br />
image_mc.addEventListener(MouseEvent.MOUSE_OUT,out);</p>
<p>function over(e:MouseEvent):void {<br />
	var t:Number = 2;<br />
	var tw_over:Tween = new Tween(image_mc,&#8221;x&#8221;,Strong.easeIn,image_mc.x, image_mc.x, t,true);<br />
	tw_over.addEventListener(TweenEvent.MOTION_CHANGE, function(e){<br />
		if(saturation&gt;-100){<br />
			saturation = -e.currentTarget.time*100/t;<br />
			color = new AdjustColor();<br />
			color.brightness=0;<br />
			color.contrast=0;<br />
			color.hue=0;<br />
			color.saturation=saturation;<br />
			matrix=color.CalculateFinalFlatArray();<br />
			colorMatrix=new ColorMatrixFilter(matrix);<br />
			filterBW=[colorMatrix];<br />
			image_mc.filters=filterBW;<br />
		}<br />
	});<br />
}<br />
function out(e:MouseEvent):void {<br />
	var t:Number = 2;<br />
	var tw_out:Tween = new Tween(image_mc,&#8221;x&#8221;,Strong.easeIn,image_mc.x, image_mc.x, t,true);<br />
	tw_out.addEventListener(TweenEvent.MOTION_CHANGE, function(e){<br />
		if(saturation&lt;0){<br />
			saturation = (e.currentTarget.time*100/t) &#8211; 100;<br />
			color = new AdjustColor();<br />
			color.brightness=0;<br />
			color.contrast=0;<br />
			color.hue=0;<br />
			color.saturation=saturation;<br />
			matrix=color.CalculateFinalFlatArray();<br />
			colorMatrix=new ColorMatrixFilter(matrix);<br />
			filterBW=[colorMatrix];<br />
			image_mc.filters=filterBW;<br />
		}<br />
	});<br />
	tw_out.addEventListener(TweenEvent.MOTION_FINISH, function(){<br />
		image_mc.filters=[];<br />
		saturation = 0;<br />
	});<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
