<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Converting and formatting colors</title>
	<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 11:19:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Christoph</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-7083</link>
		<author>Christoph</author>
		<pubDate>Wed, 20 Feb 2008 13:46:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-7083</guid>
		<description>Hi,

is there any way to set the selectedColor-property from a value fed in from an XML (=HTTPservice)? Tried with this,





and 

 

but this just keeps me giving an error.

Thanks for your help!

Christoph</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>is there any way to set the selectedColor-property from a value fed in from an XML (=HTTPservice)? Tried with this,</p>
<p>and </p>
<p>but this just keeps me giving an error.</p>
<p>Thanks for your help!</p>
<p>Christoph</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilles TASSE</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-3589</link>
		<author>Gilles TASSE</author>
		<pubDate>Wed, 24 Oct 2007 10:10:30 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-3589</guid>
		<description>This is very good example.</description>
		<content:encoded><![CDATA[<p>This is very good example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-180</link>
		<author>peterd</author>
		<pubDate>Tue, 14 Aug 2007 06:40:28 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/13/converting-and-formatting-colors/#comment-180</guid>
		<description>Here are a few more methods:

&lt;pre class="code"&gt;
/* Convert r/g/b values (255,0,255) to a fixed string ('FF00FF'). */
private function rgbToStr(r:int, g:int, b:int):String {
    return fixedInt(rgbToInt(r, g, b), "000000");
}

/* Convert a string ('0xFF00FF') to an integer (16711935). */
private function strToInt(value:String):int {
    return int(value);
}

/* Convert a string ('0xFF00FF') to an object containing an 'r', 'g', and 'b' property. */
private function strToRGB(value:String):Object {
    var temp:int = strToInt(value);
    return {r:rChannel(temp), g:gChannel(temp), b:bChannel(temp)};
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Here are a few more methods:</p>
<pre class="code">
/* Convert r/g/b values (255,0,255) to a fixed string ('FF00FF'). */
private function rgbToStr(r:int, g:int, b:int):String {
    return fixedInt(rgbToInt(r, g, b), "000000");
}

/* Convert a string ('0xFF00FF') to an integer (16711935). */
private function strToInt(value:String):int {
    return int(value);
}

/* Convert a string ('0xFF00FF') to an object containing an 'r', 'g', and 'b' property. */
private function strToRGB(value:String):Object {
    var temp:int = strToInt(value);
    return {r:rChannel(temp), g:gChannel(temp), b:bChannel(temp)};
}
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
