dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Date countdown help

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    7
    Hi

    Could anyone tell me how to create a time and date count down ie. 12 days 23 hours 45 mins and 30 secs left.

    Any help would be greatly appreciated.

    Pleasew bear in mind that while I can use flash 5 I have near 0 scripting ability.

    Thanks






  2. #2
    Señor member
    Join Date
    Dec 2000
    Location
    Huddersfield, UK
    Posts
    1,819
    Have a look at this movie as it covers the actions involved in counting down instead of up. (see it here)

    You'll be able to add to the variables that are already there in order to include days/hours etc.

    Hope it helps.

  3. #3
    Señor member
    Join Date
    Dec 2000
    Location
    Huddersfield, UK
    Posts
    1,819
    I found a tutorial that might be of use to you as well!

    http://www.flashkit.com/tutorials/Ac...34/index.shtml

    Hope this helps.

    Regards.

  4. #4
    Junior Member
    Join Date
    Mar 2001
    Posts
    7
    Thanks jamble7000

    That's a big help

  5. #5
    Junior Member
    Join Date
    Aug 2001
    Posts
    9
    Hi there !

    Don't know if that will help you but check out the following countdown AS which counts down to the actual moment. The "textfield" is obviously a dynamic textfield:

    shift = new Date();

    now = shift.getTime();

    shiftchange = new Date(2001, 9, 15, 6, 0, 0);

    days = (shiftchange-now)/1000/60/60/24;
    daysRound = Math.floor(days);

    hours = (shiftchange-now)/1000/60/60-(24*daysRound);
    hoursRound = Math.floor(hours);

    minutes = (shiftchange-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
    minutesRound = Math.floor(minutes);

    seconds = (shiftchange-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
    secondsRound = Math.round(seconds);


    hoursRound = (hoursRound>=10 ? hoursRound : "0"+hoursRound);
    minutesRound = (minutesRound>=10 ? minutesRound : "0"+minutesRound);
    secondsRound = (secondsRound>=10 ? secondsRound : "0"+secondsRound);


    textfield = (daysRound+" d "+hoursRound+" h "+minutesRound+" min "+secondsRound+" sec");


    If you'd like the whole .fla file, give me your e-mail.

    Bye...TobiAft


  6. #6
    Junior Member
    Join Date
    Mar 2001
    Posts
    7
    Cheers TobiAft, that's exactly what I was looking for.

    regards

    Peyote

  7. #7
    Junior Member
    Join Date
    Aug 2001
    Posts
    6

    countdown .fla request.

    Date countdown .fla request. from akigoh@hotmail.com

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center