SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article Discussion

    This is an article discussion thread for discussing the SitePoint article, "Flash Script - Dynamic Time in Flash"

  2. #2
    sajtan
    SitePoint Community Guest
    i made a little improvement to it, adding 1 "0" if the seconds or minutes is less than 10

    today = new Date();

    if (today.getMinutes()<10)
    {
    if (today.getSeconds()<10)
    {
    time = today.getHours() add ":0" add today.getMinutes()
    add ":0" add today.getSeconds();
    }
    if (today.getSeconds()>=10)
    {
    time = today.getHours() add ":0" add today.getMinutes()
    add ":" add today.getSeconds();
    }
    }

    if (today.getMinutes()>=10)
    {
    if (today.getSeconds()<10)
    {
    time = today.getHours() add ":" add today.getMinutes()
    add ":0" add today.getSeconds();
    }
    if (today.getSeconds()>=10)
    {
    time = today.getHours() add ":" add today.getMinutes()
    add ":" add today.getSeconds();
    }
    }

  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This article will be very useful for flash beginners


Bookmarks

Posting Permissions

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