<?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: ColorTransform &#124; RGB, Hex and random colors &#124; Actionscript Color Tutorial</title>
	<atom:link href="http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/</link>
	<description>Evan&#039;s Interactive Actionscript Exploration</description>
	<lastBuildDate>Mon, 15 Mar 2010 12:53:04 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Rose</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1314</link>
		<dc:creator>Rose</dc:creator>
		<pubDate>Thu, 11 Mar 2010 03:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1314</guid>
		<description>I&#039;m using AS2, but this will help me with randomly generating hex values. Thank you so much!</description>
		<content:encoded><![CDATA[<p>I&#8217;m using AS2, but this will help me with randomly generating hex values. Thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1221</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Tue, 27 Oct 2009 07:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1221</guid>
		<description>awesome Evan, Great Job!</description>
		<content:encoded><![CDATA[<p>awesome Evan, Great Job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaffer Haider</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1218</link>
		<dc:creator>Jaffer Haider</dc:creator>
		<pubDate>Wed, 14 Oct 2009 01:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1218</guid>
		<description>Thanks Evan! This helped me out a lot.</description>
		<content:encoded><![CDATA[<p>Thanks Evan! This helped me out a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo F. Sandino</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1107</link>
		<dc:creator>Eduardo F. Sandino</dc:creator>
		<pubDate>Mon, 18 May 2009 20:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1107</guid>
		<description>Hi... Really thanks... Evan , i don&#039;t know what were developers of AS3 thinking when not puting a HEX conversor in the flash libraries... but you solve it, almost i reinvent the wheel... But you solved this commnon issue... thanks..</description>
		<content:encoded><![CDATA[<p>Hi&#8230; Really thanks&#8230; Evan , i don&#8217;t know what were developers of AS3 thinking when not puting a HEX conversor in the flash libraries&#8230; but you solve it, almost i reinvent the wheel&#8230; But you solved this commnon issue&#8230; thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1097</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Wed, 13 May 2009 16:46:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1097</guid>
		<description>Alright, I was pretty stupid with this. I forgot to add the r, g, b values to each other to get the total RGB value...</description>
		<content:encoded><![CDATA[<p>Alright, I was pretty stupid with this. I forgot to add the r, g, b values to each other to get the total RGB value&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1096</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Wed, 13 May 2009 14:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1096</guid>
		<description>This is great, but I can&#039;t make it work. I just needed a code which could transform separated R, G, and B values into one RGB value. But when I use your rgb2hex function and I give in 0xFF, 0xFF, 0xFF, then it fills my rectangle with red color instead of white.
Do you know why this happens? (I use _ to make the code more readable, they&#039;re not in my AS file.)
colorBitmapData = new BitmapData(256, 256, false);

for (var i=0; i&lt;256; i++) {					 ___for (var j=0; j&lt;256; j++) {
______hex = rgb2Hex(0xFF, 0xFF, 0xFF);
______rect = new Rectangle(j, i, 1, 1);
______colorBitmapData.fillRect(rect, hex);
___};
};

private function rgb2Hex(r, g, b):Number {
___return (r&lt;&lt;16 &#124;&#124; g&lt;&lt;8 &#124;&#124; b);
};

I&#039;m actually trying to create a gradient filled box which has 2 black corners, 1 white corner and 1 corner with a specified color value. But I don&#039;t seem to manage the colors good enough even for a solid fill...</description>
		<content:encoded><![CDATA[<p>This is great, but I can&#8217;t make it work. I just needed a code which could transform separated R, G, and B values into one RGB value. But when I use your rgb2hex function and I give in 0xFF, 0xFF, 0xFF, then it fills my rectangle with red color instead of white.<br />
Do you know why this happens? (I use _ to make the code more readable, they&#8217;re not in my AS file.)<br />
colorBitmapData = new BitmapData(256, 256, false);</p>
<p>for (var i=0; i&lt;256; i++) {					 ___for (var j=0; j&lt;256; j++) {<br />
______hex = rgb2Hex(0xFF, 0xFF, 0xFF);<br />
______rect = new Rectangle(j, i, 1, 1);<br />
______colorBitmapData.fillRect(rect, hex);<br />
___};<br />
};</p>
<p>private function rgb2Hex(r, g, b):Number {<br />
___return (r&lt;&lt;16 || g&lt;&lt;8 || b);<br />
};</p>
<p>I&#8217;m actually trying to create a gradient filled box which has 2 black corners, 1 white corner and 1 corner with a specified color value. But I don&#8217;t seem to manage the colors good enough even for a solid fill&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1057</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Thu, 02 Apr 2009 01:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1057</guid>
		<description>To my knowledge this is the only post that actually shows how to convert hex to RGB. Thank you very much. It works well for me.</description>
		<content:encoded><![CDATA[<p>To my knowledge this is the only post that actually shows how to convert hex to RGB. Thank you very much. It works well for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jive</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-1048</link>
		<dc:creator>jive</dc:creator>
		<pubDate>Thu, 19 Mar 2009 04:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-1048</guid>
		<description>Isaac, this is the bare minimum to transform a movieclip with an instance name of &quot;mymc&quot;
---

import flash.geom.ColorTransform;
import flash.geom.Transform;

var myTransform:Transform = new Transform(mymc);
var myColorTransform:ColorTransform = new ColorTransform();
myColorTransform.rgb = 0xFF0000;
myTransform.colorTransform = myColorTransform;</description>
		<content:encoded><![CDATA[<p>Isaac, this is the bare minimum to transform a movieclip with an instance name of &#8220;mymc&#8221;<br />
&#8212;</p>
<p>import flash.geom.ColorTransform;<br />
import flash.geom.Transform;</p>
<p>var myTransform:Transform = new Transform(mymc);<br />
var myColorTransform:ColorTransform = new ColorTransform();<br />
myColorTransform.rgb = 0xFF0000;<br />
myTransform.colorTransform = myColorTransform;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-999</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Sun, 18 Jan 2009 09:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-999</guid>
		<description>Is this really the bare minimum of what&#039;s required to program a color change in flash?  Basically...  I have a movieclip in my library, and I have a command that will call that out and place it on stage, but for each time it&#039;s loaded onto the stage, I want it to randomize its color.  I&#039;ve been trying to insert code to do this in the &quot;function onLoad () { }&quot; segment, but I don&#039;t seem to understand how to get the colorTransform code to work on an already existing movie clip.  I keep finding examples that involve creating objects from code...</description>
		<content:encoded><![CDATA[<p>Is this really the bare minimum of what&#8217;s required to program a color change in flash?  Basically&#8230;  I have a movieclip in my library, and I have a command that will call that out and place it on stage, but for each time it&#8217;s loaded onto the stage, I want it to randomize its color.  I&#8217;ve been trying to insert code to do this in the &#8220;function onLoad () { }&#8221; segment, but I don&#8217;t seem to understand how to get the colorTransform code to work on an already existing movie clip.  I keep finding examples that involve creating objects from code&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ainhoitxu</title>
		<link>http://blog.circlecube.com/2008/10/tutorial/colortransform-rgb-hex-and-random-colors-actionscript-color-tutorial/#comment-959</link>
		<dc:creator>ainhoitxu</dc:creator>
		<pubDate>Thu, 13 Nov 2008 23:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/?p=375#comment-959</guid>
		<description>It does totally make sense! I am trying to do the same as you, color the inner part of an image with borders. I suppose there is no easier way to do it than having 2 different movieclips, right?</description>
		<content:encoded><![CDATA[<p>It does totally make sense! I am trying to do the same as you, color the inner part of an image with borders. I suppose there is no easier way to do it than having 2 different movieclips, right?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->