<?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: Flash simple timer/countdown</title>
	<atom:link href="http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:47:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mooky</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-538850</link>
		<dc:creator>mooky</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:48:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-538850</guid>
		<description>How to stop at ZERO

Look my code &gt;&gt;&gt;

start_time = getTimer();
countdown = 1200000;
onEnterFrame = function () {
	elapsed_time = getTimer()-start_time;
	_root.count.text = time_to_string(elapsed_time);
	_root.count_down.text = time_to_string(_root.countdown-elapsed_time);
};
function time_to_string(time_to_convert) {
	elapsed_hours = Math.floor(time_to_convert/3600000);
	remaining = time_to_convert-(elapsed_hours*3600000);
	elapsed_minutes = Math.floor(remaining/60000);
	remaining = remaining-(elapsed_minutes*60000);
	elapsed_seconds = Math.floor(remaining/1000);
	remaining = remaining-(elapsed_seconds*1000);
	elapsed_fs = Math.floor(remaining/10);
	if (elapsed_hours&lt;10) {
		hours = &quot;0&quot;+elapsed_hours.toString();
	} else {
		hours = elapsed_hours.toString();
	}
	if (elapsed_minutes&lt;10) {
		minutes = &quot;0&quot;+elapsed_minutes.toString();
	} else {
		minutes = elapsed_minutes.toString();
	}
	if (elapsed_seconds&lt;10) {
		seconds = &quot;0&quot;+elapsed_seconds.toString();
	} else {
		seconds = elapsed_seconds.toString();
	}
	if (elapsed_fs&lt;10) {
		hundredths = &quot;0&quot;+elapsed_fs.toString();
	} else {
		hundredths = elapsed_fs.toString();
	}
	return hours+&quot;:&quot;+minutes+&quot;:&quot;+seconds+&quot;:&quot;+hundredths;
}






Thanks for your help</description>
		<content:encoded><![CDATA[<p>How to stop at ZERO</p>
<p>Look my code &gt;&gt;&gt;</p>
<p>start_time = getTimer();<br />
countdown = 1200000;<br />
onEnterFrame = function () {<br />
	elapsed_time = getTimer()-start_time;<br />
	_root.count.text = time_to_string(elapsed_time);<br />
	_root.count_down.text = time_to_string(_root.countdown-elapsed_time);<br />
};<br />
function time_to_string(time_to_convert) {<br />
	elapsed_hours = Math.floor(time_to_convert/3600000);<br />
	remaining = time_to_convert-(elapsed_hours*3600000);<br />
	elapsed_minutes = Math.floor(remaining/60000);<br />
	remaining = remaining-(elapsed_minutes*60000);<br />
	elapsed_seconds = Math.floor(remaining/1000);<br />
	remaining = remaining-(elapsed_seconds*1000);<br />
	elapsed_fs = Math.floor(remaining/10);<br />
	if (elapsed_hours&lt;10) {<br />
		hours = &quot;0&quot;+elapsed_hours.toString();<br />
	} else {<br />
		hours = elapsed_hours.toString();<br />
	}<br />
	if (elapsed_minutes&lt;10) {<br />
		minutes = &quot;0&quot;+elapsed_minutes.toString();<br />
	} else {<br />
		minutes = elapsed_minutes.toString();<br />
	}<br />
	if (elapsed_seconds&lt;10) {<br />
		seconds = &quot;0&quot;+elapsed_seconds.toString();<br />
	} else {<br />
		seconds = elapsed_seconds.toString();<br />
	}<br />
	if (elapsed_fs&lt;10) {<br />
		hundredths = &quot;0&quot;+elapsed_fs.toString();<br />
	} else {<br />
		hundredths = elapsed_fs.toString();<br />
	}<br />
	return hours+&quot;:&quot;+minutes+&quot;:&quot;+seconds+&quot;:&quot;+hundredths;<br />
}</p>
<p>Thanks for your help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kayro</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-536967</link>
		<dc:creator>Kayro</dc:creator>
		<pubDate>Tue, 12 Jan 2010 15:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-536967</guid>
		<description>I need a similar countdown and countup that counts dollars, rather than time, for a fundraising site. Can you help, or direct me to a script source?</description>
		<content:encoded><![CDATA[<p>I need a similar countdown and countup that counts dollars, rather than time, for a fundraising site. Can you help, or direct me to a script source?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chetan</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-503689</link>
		<dc:creator>Chetan</dc:creator>
		<pubDate>Mon, 28 Sep 2009 05:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-503689</guid>
		<description>Thank you for the wonderful countdown timer! So far so good, but I have one problem that seems to be a common theme amongst the commenters.

I&#039;ve tried all the suggestions in the comments on how to stop the countdown at 0, but i&#039;m having no luck. If someone could be gracious enough to send me a copy of the complete code modified to stop at 0 that would be great. 

If it helps, I&#039;m currently using the 00:00:00:00 format, and I&#039;m trying to create a simple 10 minute countdown that stops at 0 and resets back to 10 minutes. The resultant flash movie is going to be embedded into a powerpoint slide to be used in a presentation.

my email address is chetankania [at] gmail [dot] com

Thank you again!</description>
		<content:encoded><![CDATA[<p>Thank you for the wonderful countdown timer! So far so good, but I have one problem that seems to be a common theme amongst the commenters.</p>
<p>I&#8217;ve tried all the suggestions in the comments on how to stop the countdown at 0, but i&#8217;m having no luck. If someone could be gracious enough to send me a copy of the complete code modified to stop at 0 that would be great. </p>
<p>If it helps, I&#8217;m currently using the 00:00:00:00 format, and I&#8217;m trying to create a simple 10 minute countdown that stops at 0 and resets back to 10 minutes. The resultant flash movie is going to be embedded into a powerpoint slide to be used in a presentation.</p>
<p>my email address is chetankania [at] gmail [dot] com</p>
<p>Thank you again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vahid</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-503261</link>
		<dc:creator>Vahid</dc:creator>
		<pubDate>Sat, 26 Sep 2009 21:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-503261</guid>
		<description>JohnBoi, to stop the timer from shaking, use JUSTIFY property for dynamic txt.</description>
		<content:encoded><![CDATA[<p>JohnBoi, to stop the timer from shaking, use JUSTIFY property for dynamic txt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnBoi</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-501461</link>
		<dc:creator>JohnBoi</dc:creator>
		<pubDate>Tue, 22 Sep 2009 01:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-501461</guid>
		<description>Hey I need to know how to stop the timer from shaking?</description>
		<content:encoded><![CDATA[<p>Hey I need to know how to stop the timer from shaking?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-490019</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Mon, 24 Aug 2009 06:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-490019</guid>
		<description>It kinda works for me, I&#039;m using the coutdown only.  The problem is, when I start my game, the timer goes about 3 milliseconds then stops.  Any help?</description>
		<content:encoded><![CDATA[<p>It kinda works for me, I&#8217;m using the coutdown only.  The problem is, when I start my game, the timer goes about 3 milliseconds then stops.  Any help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cat</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-473522</link>
		<dc:creator>Cat</dc:creator>
		<pubDate>Wed, 15 Jul 2009 07:15:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-473522</guid>
		<description>For those of you looking for a countdown timer for seconds, that will go to another scene after time is up, this worked for me (found on this link: http://groups.google.com/group/macromedia.flash/browse_thread/thread/cbde84211c16ccd7)  

I replaced  

trace(&quot;countdown complete&quot;); 

with 

gotoAndPlay(&quot;Scene 2&quot;, 1);



--------------------------------------------

var countdown_time:Number = 10; 
var counter:Number = countdown_time; 


countdown_txt.autoSize = &quot;right&quot;; 


function countdown() { 
    counter--; 
    countdown_txt.text = counter; 
    if (counter == 0) { 
        gotoAndPlay(&quot;Scene 2&quot;, 1); 
        clearInterval(intID); 
    } 



} 


countdown_txt.text = countdown_time; 
intID = setInterval(countdown,1000);</description>
		<content:encoded><![CDATA[<p>For those of you looking for a countdown timer for seconds, that will go to another scene after time is up, this worked for me (found on this link: <a href="http://groups.google.com/group/macromedia.flash/browse_thread/thread/cbde84211c16ccd7)" rel="nofollow">http://groups.google.com/group/macromedia.flash/browse_thread/thread/cbde84211c16ccd7)</a>  </p>
<p>I replaced  </p>
<p>trace(&#8220;countdown complete&#8221;); </p>
<p>with </p>
<p>gotoAndPlay(&#8220;Scene 2&#8243;, 1);</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>var countdown_time:Number = 10;<br />
var counter:Number = countdown_time; </p>
<p>countdown_txt.autoSize = &#8220;right&#8221;; </p>
<p>function countdown() {<br />
    counter&#8211;;<br />
    countdown_txt.text = counter;<br />
    if (counter == 0) {<br />
        gotoAndPlay(&#8220;Scene 2&#8243;, 1);<br />
        clearInterval(intID);<br />
    } </p>
<p>} </p>
<p>countdown_txt.text = countdown_time;<br />
intID = setInterval(countdown,1000);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-469406</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sun, 05 Jul 2009 20:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-469406</guid>
		<description>How do I make more digits. For example, once the Hours reaches 99, does it reset? Is there anyway to do it so if It reaches 99:99:99:99 then there is another digit thingy. IE: It goes to 01:00:00:00:00 when 1 second passes after 99:99:99:99?

Please respond and help me if you can
My email is pstarus@gmail.com</description>
		<content:encoded><![CDATA[<p>How do I make more digits. For example, once the Hours reaches 99, does it reset? Is there anyway to do it so if It reaches 99:99:99:99 then there is another digit thingy. IE: It goes to 01:00:00:00:00 when 1 second passes after 99:99:99:99?</p>
<p>Please respond and help me if you can<br />
My email is <a href="mailto:pstarus@gmail.com">pstarus@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ccmqv</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-468296</link>
		<dc:creator>ccmqv</dc:creator>
		<pubDate>Thu, 02 Jul 2009 19:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-468296</guid>
		<description>So do I have to add another frame so the time would stop.

If so how do you add the second frame?</description>
		<content:encoded><![CDATA[<p>So do I have to add another frame so the time would stop.</p>
<p>If so how do you add the second frame?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/comment-page-2/#comment-417890</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Sun, 29 Mar 2009 14:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2007/02/19/flash-simple-timercountdown/#comment-417890</guid>
		<description>question, when i insert the time in my html and upload both to the web (they are in the same folder)
i dont see the timer, please advice</description>
		<content:encoded><![CDATA[<p>question, when i insert the time in my html and upload both to the web (they are in the same folder)<br />
i dont see the timer, please advice</p>
]]></content:encoded>
	</item>
</channel>
</rss>
