<?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: AS2 Array count values</title>
	<atom:link href="http://blog.soulwire.co.uk/code/actionscript-array-count-values/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.soulwire.co.uk/code/actionscript-array-count-values</link>
	<description>Art + Technology</description>
	<lastBuildDate>Thu, 06 Oct 2011 13:58:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-array-count-values/comment-page-1#comment-9133</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Sat, 09 Oct 2010 15:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=38#comment-9133</guid>
		<description>I&#039;ve updated the example - this was very old and I now see a much faster and more concise method for achieving this. It will work in AS2 and AS3:

&lt;pre lang=&quot;actionscript&quot;&gt;Array.prototype.countValues = function() : Array
{
	var i, j = -1, c, o = {}, r = [], v, n = a.length;
	for(i = 0;i &lt; n;++i) (c = o[v = a[i]]) ? ++c[1] : r[int(++j)] = o[v] = [v,1];
	return r;
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve updated the example &#8211; this was very old and I now see a much faster and more concise method for achieving this. It will work in AS2 and AS3:</p>
<pre lang="actionscript">Array.prototype.countValues = function() : Array
{
	var i, j = -1, c, o = {}, r = [], v, n = a.length;
	for(i = 0;i < n;++i) (c = o[v = a[i]]) ? ++c[1] : r[int(++j)] = o[v] = [v,1];
	return r;
}</pre>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: PEter</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-array-count-values/comment-page-1#comment-9126</link>
		<dc:creator>PEter</dc:creator>
		<pubDate>Sat, 09 Oct 2010 11:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=38#comment-9126</guid>
		<description>Yes, this would be nice in AS3</description>
		<content:encoded><![CDATA[<p>Yes, this would be nice in AS3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sharat achary</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-array-count-values/comment-page-1#comment-264</link>
		<dc:creator>sharat achary</dc:creator>
		<pubDate>Tue, 24 Nov 2009 13:15:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=38#comment-264</guid>
		<description>Hey thought I might not be using this code, but it did helped me how to use while loops in better way......
Thanks anyways.</description>
		<content:encoded><![CDATA[<p>Hey thought I might not be using this code, but it did helped me how to use while loops in better way&#8230;&#8230;<br />
Thanks anyways.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-array-count-values/comment-page-1#comment-263</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 08 May 2009 03:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=38#comment-263</guid>
		<description>Could you convert this to AS3... I don&#039;t know mush AS2 since I&#039;ve just started learning.</description>
		<content:encoded><![CDATA[<p>Could you convert this to AS3&#8230; I don&#8217;t know mush AS2 since I&#8217;ve just started learning.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

