14, February 2012

Beautifying the end of countdown timer - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Design and Layout  >  Graphics & Multimedia  >  Macromedia Flash & Actionscript (Moderator: Meth0d)
Topic: Beautifying the end of countdown timer
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Beautifying the end of countdown timer  (Read 1233 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Jan 19, 2010, 03:45:13 am »

Hi,  Smiley
I'm Seimiya, I'm new to this community and I found here through yahoo search. I hope this community can help solve my queries.

1st of all, I created a countdown timer before the new year eve. And when new year arrived, I saw my timer goes to negative (-) sign.
E.e - Days, - Hrs, - Mins, - Sec - > - 00 days, - 08 hrs, - 12 mins, - 43 secs. Which I don't quite like it.

So what my problem now is the (-) sign, because I don't know how to make the timer stop when the day is arrived. So I need help from anyone here in this comunnity. I humbly request please do teach me, you can add me to msn (maxim_seimiya@hotmail.com) and leave some message like
"Hi, my name is ... and I'm willing to help you ... blah!"  Embarrassed

These are the things I hope you guys can teach me:
1) what's the script to remove the (-) sign.
2) what's the script to stop the timer when the day arrived.
3) Is it possible that I can make a picture show up when the countdown date arrived just like animated gif that will change the instance?  If can, the how do I make a new picture layer to show up?


Thank you and I'm looking forward for replies ^_^
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #1 on: Jan 19, 2010, 09:14:58 am »

To get some help, first you need to post here the code you used to create the countdown timer you have at the moment.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Jan 19, 2010, 10:07:45 pm »

ok ^_^ here is my scripts, Thanks for helping.

Quote
this.onEnterFrame = function() {

   var today:Date = new Date();
   var currentYear = today.getFullYear();
   var currentTime = today.getTime();
   
   var targetDate:Date = new Date(2010,1,1);
   var targetTime = targetDate.getTime();
   
   var timeLeft = targetTime - currentTime;
   
   var sec = Math.floor(timeLeft/1000);
   var min = Math.floor(sec/60);
   var hrs = Math.floor(min/60);
   var days = Math.floor(hrs/24);
   sec = string(sec % 60);
   if (sec.length < 2){
      sec = "0" + sec;
   }
   min = string(min % 60);
   if (min.length < 2){
      min = "0" + min;
   }
   hrs = string(hrs % 24);
   if (hrs.length < 2){
      hrs = "0" + hrs;
   }
   days = string(days);
   
   var counter:String = days + ":" + hrs + ":" + min + ":" + sec;
   timer_txt.text = counter;

}

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=9584
Tags : countdown timer Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Design and Layout  >  Graphics & Multimedia  >  Macromedia Flash & Actionscript (Moderator: Meth0d)
Topic: Beautifying the end of countdown timer
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 09:48:13 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.