<?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 for Arctic-Code</title>
	<atom:link href="http://arctic-code.com/blog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://arctic-code.com/blog</link>
	<description>as3 experiments,source,code,snuffyTHEbear, robert daniels, as3, actionscript, flash, air, blog, developer, freelance, buxton, derby</description>
	<lastBuildDate>Wed, 26 May 2010 21:15:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>Comment on Truncating numbers in actionscript&#8230; by Nico Limpika</title>
		<link>http://arctic-code.com/blog/?p=156&#038;cpage=1#comment-112</link>
		<dc:creator>Nico Limpika</dc:creator>
		<pubDate>Wed, 26 May 2010 21:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://arctic-code.com/blog/?p=156#comment-112</guid>
		<description>I think the way you guys are doing this is much too complicated. How about this simple solution I found here :
http://www.actionscript-flash-guru.com/blog/32-truncating-a-number--setting-the-precision-of-a-float--actionscript-3-as3</description>
		<content:encoded><![CDATA[<p>I think the way you guys are doing this is much too complicated. How about this simple solution I found here :<br />
<a href="http://www.actionscript-flash-guru.com/blog/32-truncating-a-number--setting-the-precision-of-a-float--actionscript-3-as3" rel="nofollow">http://www.actionscript-flash-guru.com/blog/32-truncating-a-number&#8211;setting-the-precision-of-a-float&#8211;actionscript-3-as3</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on De Monster Debugger &#8211; Video Intro by Robert</title>
		<link>http://arctic-code.com/blog/?p=183&#038;cpage=1#comment-99</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Fri, 15 Jan 2010 15:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://arctic-code.com/blog/?p=183#comment-99</guid>
		<description>@Alex that depends on what IDE / Code Editor you are using.

Flex and Flash Builder automatically build the html template and run the swf in the browser, with the Flash IDE you would need to export the swf and have a html file point at it and open in the browser.

Similar if you compile via the command line export it and run the html file pointing at it.

When running DeMonsterDebugger should have no problem picking it up.

hope that helps,
Rob</description>
		<content:encoded><![CDATA[<p>@Alex that depends on what IDE / Code Editor you are using.</p>
<p>Flex and Flash Builder automatically build the html template and run the swf in the browser, with the Flash IDE you would need to export the swf and have a html file point at it and open in the browser.</p>
<p>Similar if you compile via the command line export it and run the html file pointing at it.</p>
<p>When running DeMonsterDebugger should have no problem picking it up.</p>
<p>hope that helps,<br />
Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on De Monster Debugger &#8211; Video Intro by Alex</title>
		<link>http://arctic-code.com/blog/?p=183&#038;cpage=1#comment-98</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 15 Jan 2010 15:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://arctic-code.com/blog/?p=183#comment-98</guid>
		<description>How can I use debbugger in browsers. Firefox and IE?
Thx</description>
		<content:encoded><![CDATA[<p>How can I use debbugger in browsers. Firefox and IE?<br />
Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Truncating numbers in actionscript&#8230; by ayumilove</title>
		<link>http://arctic-code.com/blog/?p=156&#038;cpage=1#comment-96</link>
		<dc:creator>ayumilove</dc:creator>
		<pubDate>Tue, 15 Dec 2009 12:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://arctic-code.com/blog/?p=156#comment-96</guid>
		<description>here is a minor revision with dimuMurray function...

		private function truncate(val:String, decimalPlaces:Number):Number
		{
			//Source: http://arctic-code.com/blog/?p=156
			var numArray:Array = val.split(&quot;.&quot;);
			var whole:String = numArray[0];
			var frac:String = &quot;&quot;;
			
			if(numArray[1] != null)
				frac = numArray[1];
			
			if (decimalPlaces &gt; frac.length) decimalPlaces = frac.length;
			
			return parseFloat(whole + &quot;.&quot; + frac.substr(0,decimalPlaces));

		}

sometimes, some number does not have any decimal at all, and this causes error of null. to counter that, set frac to an empty string first :D</description>
		<content:encoded><![CDATA[<p>here is a minor revision with dimuMurray function&#8230;</p>
<p>		private function truncate(val:String, decimalPlaces:Number):Number<br />
		{<br />
			//Source: <a href="http://arctic-code.com/blog/?p=156" rel="nofollow">http://arctic-code.com/blog/?p=156</a><br />
			var numArray:Array = val.split(&#8220;.&#8221;);<br />
			var whole:String = numArray[0];<br />
			var frac:String = &#8220;&#8221;;</p>
<p>			if(numArray[1] != null)<br />
				frac = numArray[1];</p>
<p>			if (decimalPlaces &gt; frac.length) decimalPlaces = frac.length;</p>
<p>			return parseFloat(whole + &#8220;.&#8221; + frac.substr(0,decimalPlaces));</p>
<p>		}</p>
<p>sometimes, some number does not have any decimal at all, and this causes error of null. to counter that, set frac to an empty string first <img src='http://arctic-code.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Truncating numbers in actionscript&#8230; by Kez</title>
		<link>http://arctic-code.com/blog/?p=156&#038;cpage=1#comment-92</link>
		<dc:creator>Kez</dc:creator>
		<pubDate>Thu, 10 Dec 2009 10:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://arctic-code.com/blog/?p=156#comment-92</guid>
		<description>Well, this is my way. I&#039;m pretty sure this does not round up or down ^^

It really does a lot of conversions: Number-&gt;String-&gt;Number

Hope this helps someone =)

var avgRed:Number = 0;

(...) //some calculations

var maxRGB:int = 255;	
ret[0] = Number((avgRed/maxRGB).toPrecision(2)); 
trace(&quot;the avg red of the pic is = &quot; + ret[0]);

//the avg red of the pic is = 0.55</description>
		<content:encoded><![CDATA[<p>Well, this is my way. I&#8217;m pretty sure this does not round up or down ^^</p>
<p>It really does a lot of conversions: Number-&gt;String-&gt;Number</p>
<p>Hope this helps someone =)</p>
<p>var avgRed:Number = 0;</p>
<p>(&#8230;) //some calculations</p>
<p>var maxRGB:int = 255;<br />
ret[0] = Number((avgRed/maxRGB).toPrecision(2));<br />
trace(&#8220;the avg red of the pic is = &#8221; + ret[0]);</p>
<p>//the avg red of the pic is = 0.55</p>
]]></content:encoded>
	</item>
</channel>
</rss>
