<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>agitated Observer &#187; actionscript</title>
	<atom:link href="http://agitatedobserver.com/tags/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://agitatedobserver.com</link>
	<description>Observations from the agitated one.</description>
	<lastBuildDate>Sun, 08 Nov 2009 13:54:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AS3: Random Colour between 2 colour values</title>
		<link>http://agitatedobserver.com/as3-random-colour-between-2-colour-values/</link>
		<comments>http://agitatedobserver.com/as3-random-colour-between-2-colour-values/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 02:13:34 +0000</pubDate>
		<dc:creator>AGI</dc:creator>
				<category><![CDATA[Flash / Actionscript]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[colour values]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://agitatedobserver.com/?p=379</guid>
		<description><![CDATA[Useful little snippet to generate a colour between 2 colour values in ActionScript 3
12345678910111213import fl.motion.Color;

var color1:uint = 0x03e338;
var color2:uint = 0xbbe303;
var newColor:uint = Color.interpolateColor&#40;color1, color2, randomHue&#41;;

private function _randomNumber&#40;low:Number=NaN, high:Number=NaN&#41;:Number
&#123;
&#160; &#160; var low:Number = low;
&#160; &#160; var high:Number = high;

&#160; &#160; return Math.random&#40;&#41; * &#40;high - low&#41; + low;
&#125;
Related Posts:AS3 Currency FormatterSimple way to randomise Arrays [...]]]></description>
			<content:encoded><![CDATA[<p>Useful little snippet to generate a colour between 2 colour values in ActionScript 3</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">import</span> fl<span style="color: #000066; font-weight: bold;">.</span>motion<span style="color: #000066; font-weight: bold;">.</span>Color<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #6699cc; font-weight: bold;">var</span> color1<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = 0x03e338<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> color2<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = 0xbbe303<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> newColor<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = Color<span style="color: #000066; font-weight: bold;">.</span>interpolateColor<span style="color: #000000;">&#40;</span>color1<span style="color: #000066; font-weight: bold;">,</span> color2<span style="color: #000066; font-weight: bold;">,</span> randomHue<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _randomNumber<span style="color: #000000;">&#40;</span>low<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a>=<span style="color: #004993;">NaN</span><span style="color: #000066; font-weight: bold;">,</span> high<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a>=<span style="color: #004993;">NaN</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> low<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = low<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> high<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = high<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>high <span style="color: #000066; font-weight: bold;">-</span> low<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> low<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://agitatedobserver.com/as3-currency-formatter/" rel="bookmark">AS3 Currency Formatter</a></li><li><a href="http://agitatedobserver.com/simple-way-to-randomise-arrays-in-as3/" rel="bookmark">Simple way to randomise Arrays in AS3</a></li><li><a href="http://agitatedobserver.com/snippet-easy-globaltolocal-in-as3/" rel="bookmark">Snippet: Easy globalToLocal in AS3</a></li><li><a href="http://agitatedobserver.com/youre-going-to-wake-up-the-rest-of-the-bitches/" rel="bookmark">You're waking up the rest of the bitches...</a></li><li><a href="http://agitatedobserver.com/metamorphosis-by-glenn-marshall/" rel="bookmark">Metamorphosis by Glenn Marshall</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://agitatedobserver.com/as3-random-colour-between-2-colour-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple way to randomise Arrays in AS3</title>
		<link>http://agitatedobserver.com/simple-way-to-randomise-arrays-in-as3/</link>
		<comments>http://agitatedobserver.com/simple-way-to-randomise-arrays-in-as3/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 08:41:07 +0000</pubDate>
		<dc:creator>AGI</dc:creator>
				<category><![CDATA[Flash / Actionscript]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://agitatedobserver.com/?p=344</guid>
		<description><![CDATA[Found this over at daveoncode and thought i would like to share it:
12345678910private function _getRandom&#40;arr:Array&#41;:void

&#160; &#160; var arr2:Array = new Array&#40;&#41;;

&#160; &#160; while &#40;arr.length &#62; 0&#41; &#123;
&#160; &#160; &#160; &#160; arr2.push&#40;arr.splice&#40;Math.round&#40;Math.random&#40;&#41; * &#40;arr.length - 1&#41;&#41;, 1&#41;&#91;0&#93;&#41;;
&#160; &#160; &#125;

&#160; &#160; return arr2;
&#125;
Related Posts:AS3 Currency FormatterAS3: Random Colour between 2 colour valuesSnippet: Easy globalToLocal in AS3INSTABUDGET09 launchedSimple AS3 [...]]]></description>
			<content:encoded><![CDATA[<p>Found this over at <a href="http://www.daveoncode.com/2009/01/08/implementing-arrayshuffle-in-actionscript/" target="_blank">daveoncode</a> and thought i would like to share it:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _getRandom<span style="color: #000000;">&#40;</span>arr<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> arr2<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>arr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">&gt;</span> 0<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; arr2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>arr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">splice</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">round</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>arr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> 1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> arr2<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://agitatedobserver.com/as3-currency-formatter/" rel="bookmark">AS3 Currency Formatter</a></li><li><a href="http://agitatedobserver.com/as3-random-colour-between-2-colour-values/" rel="bookmark">AS3: Random Colour between 2 colour values</a></li><li><a href="http://agitatedobserver.com/snippet-easy-globaltolocal-in-as3/" rel="bookmark">Snippet: Easy globalToLocal in AS3</a></li><li><a href="http://agitatedobserver.com/instabudget09-launched/" rel="bookmark">INSTABUDGET09 launched</a></li><li><a href="http://agitatedobserver.com/simple-as3-dynamic-fonts-class/" rel="bookmark">Simple AS3 dynamic fonts class</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://agitatedobserver.com/simple-way-to-randomise-arrays-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
