<?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>NewSourceMedia Blog &#187; Math</title>
	<atom:link href="http://newsourcemedia.com/blog/category/flash/math-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Mon, 07 May 2012 01:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Formatting Numbers in Flash for Commas</title>
		<link>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/</link>
		<comments>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[commas]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2007/09/14/formatting-numbers-in-flash-for-commas/</guid>
		<description><![CDATA[Here is how to use actionscript to format a number in Flash with commas per thousands. my_number = "12587654325"; // array in sections of 3 to separate with commas trace(my_number); var dollar_array:Array = new Array(); var start:Number; var end:Number = &#8230; <a href="http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Here is how to use actionscript to format a number in Flash with commas per thousands.
<span id="more-161"></span>

my_number = "12587654325";

// array in sections of 3 to separate with commas
trace(my_number);
var dollar_array:Array = new Array();
var start:Number;
var end:Number = my_number.length;
trace(my_number.length);
while (end &gt; 0) {
trace(end);
start = Math.max(end - 3, 0);
dollar_array.unshift(my_number.slice(start, end));
end = start;
}

// assign a comma delimited value from dollar_array
my_number = dollar_array.join(",");
trace(my_number);]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/formatting-numbers-in-flash-for-commas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Actionscript Converting Negitive to Positive Numbers</title>
		<link>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/</link>
		<comments>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/#comments</comments>
		<pubDate>Sat, 11 Dec 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[absolut]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[mathematical]]></category>
		<category><![CDATA[negitive]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[positive]]></category>
		<category><![CDATA[positive number]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2004/12/10/actionscript-converting-negitive-to-positive-numbers/</guid>
		<description><![CDATA[Needed to know the simples way to convert a number from positive to negative or negative to positive in actionscripts. Here it is. This is a revise to the flash actionscript tutorial on converting negitive numbers to positive numbers. Now &#8230; <a href="http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Needed to know the simples way to convert a number from positive to negative or negative to positive in actionscripts. Here it is.
<span id="more-207"></span>

This is a revise to the flash actionscript tutorial on converting negitive numbers to positive numbers.

<strong>Now use Abs() function in flash actionscript</strong>
<h3>Math.abs()</h3>
The flash Math.abs() method is used to return the absolute value of x. This basically means it returns the distance between 0 and x in flash actionscript.

Although -5 is a negative number, it's absolute value is the same as 5. This is because -5 has a distance of 5 from x just as 5 has a distance of 5 from x.

Example:
<p class="code">Math.abs(-10); // Returns 10
Math.abs(10); // Returns 10
<h3>Old Tutorial on Converting Negatives to Positive and Positive to Negative numbers</h3>
I needed to know the simples way to convert a number from                        positive to negative or negative to positive in actionscripts.                        Here it is:


<p class="sourceCODE">// convert 100 to negative -100
n = 100;
n = - n;
trace(n);// will = -100
// convert -55 to positive 50
n = -50;
n = - n;
trace(n);// will = 50



This is how it work. Zero minus a positive number = a negative                        number. And Zero minus a negative number = a positive number.]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/actionscript-converting-negitive-to-positive-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</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! -->
