<?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: Creating a date countdown timer in ActionScript 3 / Flash</title>
	<atom:link href="http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/</link>
	<description>wrangling the Internet's wildest</description>
	<lastBuildDate>Fri, 16 Dec 2011 14:20:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: 15 Countdown Timer&#160;&#124;&#160;Code&#38;Design-Studio</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16736</link>
		<dc:creator>15 Countdown Timer&#160;&#124;&#160;Code&#38;Design-Studio</dc:creator>
		<pubDate>Wed, 29 Dec 2010 05:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16736</guid>
		<description>[...]   Title: Creating a date countdown timer in ActionScript 3 / Flash Technology: Flash AS3 Code Site: Click here Demo Site: Click here      Title: Flash simple timer/countdown Technology: [...]</description>
		<content:encoded><![CDATA[<p>[...]   Title: Creating a date countdown timer in ActionScript 3 / Flash Technology: Flash AS3 Code Site: Click here Demo Site: Click here      Title: Flash simple timer/countdown Technology: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ans</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16472</link>
		<dc:creator>Ans</dc:creator>
		<pubDate>Tue, 21 Dec 2010 03:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16472</guid>
		<description>Hi Chris,

I&#039;m afraid I don&#039;t have time at the moment to build help build one for you. But I could probably answer specific questions about problems with your implementation. Check out the source code download above and work from there. Cheers!</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I&#8217;m afraid I don&#8217;t have time at the moment to build help build one for you. But I could probably answer specific questions about problems with your implementation. Check out the source code download above and work from there. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Dunn</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16447</link>
		<dc:creator>Chris Dunn</dc:creator>
		<pubDate>Mon, 20 Dec 2010 10:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16447</guid>
		<description>Can anybody help me in Action Script 3 I am trying to create a count down timer for 2 minutes but I have had no luck so far.

Thank you

Chris</description>
		<content:encoded><![CDATA[<p>Can anybody help me in Action Script 3 I am trying to create a count down timer for 2 minutes but I have had no luck so far.</p>
<p>Thank you</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16241</link>
		<dc:creator>Varun</dc:creator>
		<pubDate>Tue, 14 Dec 2010 09:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16241</guid>
		<description>Nice implementation!</description>
		<content:encoded><![CDATA[<p>Nice implementation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Dunn</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16219</link>
		<dc:creator>Chris Dunn</dc:creator>
		<pubDate>Mon, 13 Dec 2010 16:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16219</guid>
		<description>Hi can you help I need a 2 minute countdown timer in Action Script 3 for a project I&#039;m working on at uni. I would also like it to say times up at the end of timer can you help me.

Thank you

Chris</description>
		<content:encoded><![CDATA[<p>Hi can you help I need a 2 minute countdown timer in Action Script 3 for a project I&#8217;m working on at uni. I would also like it to say times up at the end of timer can you help me.</p>
<p>Thank you</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ottie</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16161</link>
		<dc:creator>ottie</dc:creator>
		<pubDate>Sat, 11 Dec 2010 21:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16161</guid>
		<description>It&#039;s ok: I just discovered that flash starts the month array at 0 instead of 1. So my date was a month off, 30 days...
Thanks for the script.</description>
		<content:encoded><![CDATA[<p>It&#8217;s ok: I just discovered that flash starts the month array at 0 instead of 1. So my date was a month off, 30 days&#8230;<br />
Thanks for the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ottie</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-16160</link>
		<dc:creator>ottie</dc:creator>
		<pubDate>Sat, 11 Dec 2010 21:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-16160</guid>
		<description>Hi Nate,

I tried to run your script - it works, but the countdowan appears to be way off - 30 days or so? Any clue?</description>
		<content:encoded><![CDATA[<p>Hi Nate,</p>
<p>I tried to run your script &#8211; it works, but the countdowan appears to be way off &#8211; 30 days or so? Any clue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ans</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-14293</link>
		<dc:creator>Ans</dc:creator>
		<pubDate>Tue, 14 Sep 2010 21:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-14293</guid>
		<description>Hi Nate,

A variety of things could be going wrong, but I&#039;m guessing you copied the timer graphics without connecting the script to them. Notice in &quot;counter.fla&quot; that the document class is set to &quot;com.anselmbradford.Main&quot; in the Properties panel for the whole file. If this didn&#039;t get copied the code won&#039;t be attached to the graphics.</description>
		<content:encoded><![CDATA[<p>Hi Nate,</p>
<p>A variety of things could be going wrong, but I&#8217;m guessing you copied the timer graphics without connecting the script to them. Notice in &#8220;counter.fla&#8221; that the document class is set to &#8220;com.anselmbradford.Main&#8221; in the Properties panel for the whole file. If this didn&#8217;t get copied the code won&#8217;t be attached to the graphics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NPGordon</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-14283</link>
		<dc:creator>NPGordon</dc:creator>
		<pubDate>Tue, 14 Sep 2010 13:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-14283</guid>
		<description>I have a rather simple question:  I have a working .fla index file and I would like to incorporate the timer into it, obviously (running cs5).  What&#039;s the best setup for including the whole timer on my page?  I can&#039;t seem to get it to show up, though I&#039;m not getting any compiler errors.</description>
		<content:encoded><![CDATA[<p>I have a rather simple question:  I have a working .fla index file and I would like to incorporate the timer into it, obviously (running cs5).  What&#8217;s the best setup for including the whole timer on my page?  I can&#8217;t seem to get it to show up, though I&#8217;m not getting any compiler errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ans</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/comment-page-1/#comment-10069</link>
		<dc:creator>Ans</dc:creator>
		<pubDate>Mon, 08 Mar 2010 09:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873#comment-10069</guid>
		<description>I got a question about making the countdown timer blink in my provided example. To do this change the update interval (currently at one second) and change the &lt;code&gt;textColor&lt;/code&gt; property on every update. 

First open &lt;code&gt;CountDown.as&lt;/code&gt; and find:

&lt;pre lang=&quot;actionscript&quot;&gt;var ticker = new Timer(1000);&lt;/pre&gt;

and change to:

&lt;pre lang=&quot;actionscript&quot;&gt;var ticker = new Timer(500);&lt;/pre&gt;

So that it fires every half a second.

Then open &lt;code&gt;Main.as&lt;/code&gt; and find:

&lt;pre lang=&quot;actionscript&quot;&gt;
	days.digit.text = daysLeft;
	hours.digit.text = hoursLeft;
	minutes.digit.text = minutesLeft;
	seconds.digit.text = secondsLeft;
&lt;/pre&gt;

Replace this with:

&lt;pre lang=&quot;actionscript&quot;&gt;
	var origDays:int = days.digit.text;
	var origHours:int = hours.digit.text;
	var origMins:int = minutes.digit.text;
	var origSecs:int = seconds.digit.text;
			
	if (origDays-daysLeft != 0) 
	{
		days.digit.text = daysLeft;
		days.digit.textColor = 0xff0000;
	}
	else
	{
		days.digit.textColor = 0x000000;
	}
			
	if (origHours-hoursLeft != 0) 
	{
		hours.digit.text = hoursLeft;
		hours.digit.textColor = 0xff0000;
	}
	else
	{
		hours.digit.textColor = 0x000000;
	}
			
	if (origMins-minutesLeft != 0) 
	{
		minutes.digit.text = minutesLeft;
		minutes.digit.textColor = 0xff0000;
	}
	else
	{
		minutes.digit.textColor = 0x000000;
	}
			
	if (origSecs-secondsLeft != 0) 
	{
		seconds.digit.text = secondsLeft;
		seconds.digit.textColor = 0xff0000;
	}
	else
	{
		seconds.digit.textColor = 0x000000;
	}
&lt;/pre&gt;

This checks if the digit is updating, if it is, change the color to red, otherwise change it to black. Since the timer is firing every half a second the seconds will blink red.</description>
		<content:encoded><![CDATA[<p>I got a question about making the countdown timer blink in my provided example. To do this change the update interval (currently at one second) and change the <code>textColor</code> property on every update. </p>
<p>First open <code>CountDown.as</code> and find:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> ticker = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>and change to:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> ticker = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>So that it fires every half a second.</p>
<p>Then open <code>Main.as</code> and find:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">	days.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = daysLeft;
	hours.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = hoursLeft;
	minutes.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = minutesLeft;
	seconds.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = secondsLeft;</pre></div></div>

<p>Replace this with:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">var</span> origDays:<span style="color: #0066CC;">int</span> = days.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span>;
	<span style="color: #000000; font-weight: bold;">var</span> origHours:<span style="color: #0066CC;">int</span> = hours.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span>;
	<span style="color: #000000; font-weight: bold;">var</span> origMins:<span style="color: #0066CC;">int</span> = minutes.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span>;
	<span style="color: #000000; font-weight: bold;">var</span> origSecs:<span style="color: #0066CC;">int</span> = seconds.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span>;
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>origDays-daysLeft <span style="color: #66cc66;">!</span>= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> 
	<span style="color: #66cc66;">&#123;</span>
		days.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = daysLeft;
		days.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0xff0000;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		days.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0x000000;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>origHours-hoursLeft <span style="color: #66cc66;">!</span>= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> 
	<span style="color: #66cc66;">&#123;</span>
		hours.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = hoursLeft;
		hours.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0xff0000;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		hours.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0x000000;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>origMins-minutesLeft <span style="color: #66cc66;">!</span>= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> 
	<span style="color: #66cc66;">&#123;</span>
		minutes.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = minutesLeft;
		minutes.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0xff0000;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		minutes.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0x000000;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>origSecs-secondsLeft <span style="color: #66cc66;">!</span>= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> 
	<span style="color: #66cc66;">&#123;</span>
		seconds.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">text</span> = secondsLeft;
		seconds.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0xff0000;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		seconds.<span style="color: #006600;">digit</span>.<span style="color: #0066CC;">textColor</span> = 0x000000;
	<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>This checks if the digit is updating, if it is, change the color to red, otherwise change it to black. Since the timer is firing every half a second the seconds will blink red.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

