<?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: Simple Flash Countdowns And Timers</title>
	<atom:link href="http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/</link>
	<description>WebDevelopment - News &#124;&#124; Work &#124;&#124; Tutorials</description>
	<lastBuildDate>Tue, 08 Jun 2010 12:52:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ernesto Ruiz</title>
		<link>http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/comment-page-1/#comment-285</link>
		<dc:creator>Ernesto Ruiz</dc:creator>
		<pubDate>Tue, 13 Apr 2010 02:49:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=303#comment-285</guid>
		<description>Hi I like your thread, i neet set my countdown to UTC but I cant, can you help me please?

//First we create a date object. Note that we count the months from &quot;0&quot;!
var endDate:Date = new Date(2010, 3, 18, 17, 0, 0, 0);
//next we create a timer that will update the time every second
var timer:Timer = new Timer(1000);
//we add an event listener to the timer and then we start it
timer.addEventListener(TimerEvent.TIMER, updateTime);
timer.start();
//Calculate the time remaining as it is being updated
function updateTime(e:TimerEvent):void{
	//we create a variable to hold the current date
	var currentDate:Date = new Date();
	//we calculate the time to FIFA World Cup 2010
	var timeLeft:Number = endDate.getTime() - currentDate.getTime();
	//we convert the remaining time into seconds, minutes, hours, and days
	var seconds:Number = Math.floor(timeLeft / 1000);
	var minutes:Number = Math.floor(seconds / 60);
	var hours:Number = Math.floor(minutes / 60);
	var days:Number = Math.floor(hours / 24);

	seconds %= 60;
	minutes %= 60;
	hours %= 24;

	//we convert the numbers to strings
	var sec:String = seconds.toString();
	var min:String = minutes.toString();
	var hrs:String = hours.toString();
	var d:String = days.toString();

	//if we have a single digit we add &quot;0&quot; in front of it
	if (sec.length &lt; 2) {
	    sec = &quot;0&quot; + sec;
	}

	if (min.length &lt; 2) {
	    min = &quot;0&quot; + min;
	}

	if (hrs.length &lt; 2) {
	    hrs = &quot;0&quot; + hrs;
	}

	//we create a variable to hold all elements and then we add it to our text field
	var time:String = d + &quot;:&quot; + hrs + &quot;:&quot; + min + &quot;:&quot; + sec;
	time_txt.text = time;
}</description>
		<content:encoded><![CDATA[<p>Hi I like your thread, i neet set my countdown to UTC but I cant, can you help me please?</p>
<p>//First we create a date object. Note that we count the months from &#8220;0&#8243;!<br />
var endDate:Date = new Date(2010, 3, 18, 17, 0, 0, 0);<br />
//next we create a timer that will update the time every second<br />
var timer:Timer = new Timer(1000);<br />
//we add an event listener to the timer and then we start it<br />
timer.addEventListener(TimerEvent.TIMER, updateTime);<br />
timer.start();<br />
//Calculate the time remaining as it is being updated<br />
function updateTime(e:TimerEvent):void{<br />
	//we create a variable to hold the current date<br />
	var currentDate:Date = new Date();<br />
	//we calculate the time to FIFA World Cup 2010<br />
	var timeLeft:Number = endDate.getTime() &#8211; currentDate.getTime();<br />
	//we convert the remaining time into seconds, minutes, hours, and days<br />
	var seconds:Number = Math.floor(timeLeft / 1000);<br />
	var minutes:Number = Math.floor(seconds / 60);<br />
	var hours:Number = Math.floor(minutes / 60);<br />
	var days:Number = Math.floor(hours / 24);</p>
<p>	seconds %= 60;<br />
	minutes %= 60;<br />
	hours %= 24;</p>
<p>	//we convert the numbers to strings<br />
	var sec:String = seconds.toString();<br />
	var min:String = minutes.toString();<br />
	var hrs:String = hours.toString();<br />
	var d:String = days.toString();</p>
<p>	//if we have a single digit we add &#8220;0&#8243; in front of it<br />
	if (sec.length &lt; 2) {<br />
	    sec = &quot;0&quot; + sec;<br />
	}</p>
<p>	if (min.length &lt; 2) {<br />
	    min = &quot;0&quot; + min;<br />
	}</p>
<p>	if (hrs.length &lt; 2) {<br />
	    hrs = &quot;0&quot; + hrs;<br />
	}</p>
<p>	//we create a variable to hold all elements and then we add it to our text field<br />
	var time:String = d + &quot;:&quot; + hrs + &quot;:&quot; + min + &quot;:&quot; + sec;<br />
	time_txt.text = time;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
