Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Flash countdown timer?

  • 06-06-2006 12:27PM
    #1
    Registered Users, Registered Users 2 Posts: 771 ✭✭✭


    Hi,

    I have a flash countdown timer that counts
    down minutes and seconds to the next hour.
    I got from flashkit and was able to modify it
    enough (eg different background)

    but i really need another one to count down from
    hours and minutes until midnight (no seconds)

    anyone know how to do this or have a similar script
    lying around!? pretty please


Comments

  • Closed Accounts Posts: 266 ✭✭decimal


    http://www.kirupa.com/developer/mx/countdown.htm

    This sounds similar to something you need, the code is explained in detail, so perhaps you can edit it to work your own way.


  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt




    Hopefully you can work it out from here :)

    You'll end up with something like ...

    now = new Date();

    from this .. get the day the month and the year ...

    feed these into a new date object

    midnight = new Date(now.getYear(),now.getMonth(),now.getDate()+1,0,0);

    midnight.UTC - now.UTC = number of seconds ...

    Please note .. thats very rough but you should be able to figure it out :)


Advertisement