<?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: Formatting Numbers in Flash for Commas</title>
	<atom:link href="http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Wed, 23 May 2012 11:06:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Winkyboy</title>
		<link>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/comment-page-1/#comment-480</link>
		<dc:creator>Winkyboy</dc:creator>
		<pubDate>Fri, 04 Jun 2010 16:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/2007/09/14/formatting-numbers-in-flash-for-commas/#comment-480</guid>
		<description>Thanks. With a little conversion of extended characters to regular ones (like the fancy &quot;&quot; to regular quotes), this works nicely. Providing this form allows all the characters, here&#039;s this code converted into a function:

private function commify(my_number:Number):String {
// array in sections of 3 to separate with commas
var strNumber:String = my_number.toString();
var dollar_array:Array = new Array();
var start:Number;
var end:Number = strNumber.length;

while (end &gt; 0) {
start = Math.max(end - 3, 0);
dollar_array.unshift(strNumber.slice(start, end));
end = start;
}

// assign a comma delimited value from dollar_array
return dollar_array.join(&quot;,&quot;);
}</description>
		<content:encoded><![CDATA[<p>Thanks. With a little conversion of extended characters to regular ones (like the fancy &#8220;&#8221; to regular quotes), this works nicely. Providing this form allows all the characters, here&#8217;s this code converted into a function:</p>
<p>private function commify(my_number:Number):String {<br />
// array in sections of 3 to separate with commas<br />
var strNumber:String = my_number.toString();<br />
var dollar_array:Array = new Array();<br />
var start:Number;<br />
var end:Number = strNumber.length;</p>
<p>while (end &gt; 0) {<br />
start = Math.max(end &#8211; 3, 0);<br />
dollar_array.unshift(strNumber.slice(start, end));<br />
end = start;<br />
}</p>
<p>// assign a comma delimited value from dollar_array<br />
return dollar_array.join(&#8220;,&#8221;);<br />
}</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! -->
