<?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: CS4 Only: Using AdjustColor()</title>
	<atom:link href="http://simplistika.com/cs4-only-using-adjustcolor/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplistika.com/cs4-only-using-adjustcolor/</link>
	<description>Think Simple</description>
	<lastBuildDate>Wed, 07 Jul 2010 22:23:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jared</title>
		<link>http://simplistika.com/cs4-only-using-adjustcolor/comment-page-1/#comment-627</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Mon, 30 Nov 2009 13:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=402#comment-627</guid>
		<description>Thanks dave that is awesome.</description>
		<content:encoded><![CDATA[<p>Thanks dave that is awesome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Bleeker</title>
		<link>http://simplistika.com/cs4-only-using-adjustcolor/comment-page-1/#comment-623</link>
		<dc:creator>Dave Bleeker</dc:creator>
		<pubDate>Sat, 14 Nov 2009 00:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=402#comment-623</guid>
		<description>ooops.. little correction.. just declare the AdjustColor under the sprite so it will be known in the function updateColors:

private var mySprite:Sprite;
private var adjColor:AdjustColor;

and in the function myClass:

mySprite = new Sprite(); // No need to redeclare
adjColor = new AdjustColor();


Sorry for the mistake, I just wrote the whole thing in this textarea here, I guess my brain was locked in scramble mode :-p</description>
		<content:encoded><![CDATA[<p>ooops.. little correction.. just declare the AdjustColor under the sprite so it will be known in the function updateColors:</p>
<p>private var mySprite:Sprite;<br />
private var adjColor:AdjustColor;</p>
<p>and in the function myClass:</p>
<p>mySprite = new Sprite(); // No need to redeclare<br />
adjColor = new AdjustColor();</p>
<p>Sorry for the mistake, I just wrote the whole thing in this textarea here, I guess my brain was locked in scramble mode :-p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Bleeker</title>
		<link>http://simplistika.com/cs4-only-using-adjustcolor/comment-page-1/#comment-622</link>
		<dc:creator>Dave Bleeker</dc:creator>
		<pubDate>Sat, 14 Nov 2009 00:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=402#comment-622</guid>
		<description>You can also easy tween this filter by using the CalculateFinalFlatArray() method of the AdjustColor. I made a simple example here for those who are interested:

package
{
  import flash.display.*;
  import fl.motion.AdjustColor;
  import flash.filters.ColorMatrixFilter;
  import fl.transitions.*;
  import fl.transitions.easing.*;

  public class myClass extends Sprite
  {
    private var mySprite:Sprite;

    public function myClass()
    {
      var mySprite:Sprite = new Sprite();
      mySprite.graphics.beginFill(0xFFFF00);
      mySprite.graphics.drawRect(0, 0, 150, 100);
      mySprite.graphics.endFill();
      addChild(mySprite);    

      var adjColor:AdjustColor = new AdjustColor();
      adjColor.saturation = 0;
      adjColor.contrast = 0;
      adjColor.brightness = 0;
      adjColor.hue = 0;
				
      colorTween = new Tween(adjColor, &quot;hue&quot;, None.easeIn, 0, 125, 2, true);

      colorTween.addEventListener(TweenEvent.MOTION_CHANGE, updateColors);
    }

    private function updateColors(e:TweenEvent):void 
    {
      var cmf:ColorMatrixFilter = new ColorMatrixFilter(adjColor.CalculateFinalFlatArray());
      mySprite.filters = [cmf];
    }
  }
}

I hope it&#039;s useful for someone</description>
		<content:encoded><![CDATA[<p>You can also easy tween this filter by using the CalculateFinalFlatArray() method of the AdjustColor. I made a simple example here for those who are interested:</p>
<p>package<br />
{<br />
  import flash.display.*;<br />
  import fl.motion.AdjustColor;<br />
  import flash.filters.ColorMatrixFilter;<br />
  import fl.transitions.*;<br />
  import fl.transitions.easing.*;</p>
<p>  public class myClass extends Sprite<br />
  {<br />
    private var mySprite:Sprite;</p>
<p>    public function myClass()<br />
    {<br />
      var mySprite:Sprite = new Sprite();<br />
      mySprite.graphics.beginFill(0xFFFF00);<br />
      mySprite.graphics.drawRect(0, 0, 150, 100);<br />
      mySprite.graphics.endFill();<br />
      addChild(mySprite);    </p>
<p>      var adjColor:AdjustColor = new AdjustColor();<br />
      adjColor.saturation = 0;<br />
      adjColor.contrast = 0;<br />
      adjColor.brightness = 0;<br />
      adjColor.hue = 0;</p>
<p>      colorTween = new Tween(adjColor, &#8220;hue&#8221;, None.easeIn, 0, 125, 2, true);</p>
<p>      colorTween.addEventListener(TweenEvent.MOTION_CHANGE, updateColors);<br />
    }</p>
<p>    private function updateColors(e:TweenEvent):void<br />
    {<br />
      var cmf:ColorMatrixFilter = new ColorMatrixFilter(adjColor.CalculateFinalFlatArray());<br />
      mySprite.filters = [cmf];<br />
    }<br />
  }<br />
}</p>
<p>I hope it&#8217;s useful for someone</p>
]]></content:encoded>
	</item>
</channel>
</rss>
