Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Countdown clock – but keep spacing for 1

  • Countdown clock – but keep spacing for 1

    Posted by Traci Brinling on May 17, 2016 at 4:01 pm

    Ok so need help. I have a countdown clock and it works fine but when it hits 1 the numbers shift and they want the clock to keep the same spacing like a digital clock so the 1 appears on the right side of the 0 outline like the picture below. Any idea how I would be able to do this…

    Here is the expression I am currently using for the countdown…

    rate = -1;
    clockStart = 600;
    function padZero(n){
    if (n < 10) return "0" + n else return "" + n
    }
    clockTime = Math.max(clockStart + rate*(time - inPoint),0);
    t = Math.floor(clockTime);
    min = Math.floor((t%3600)/60);
    sec = Math.floor(t%60);
    padZero(min) + ":" + padZero(sec)

    Xavier Gomez replied 10 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Xavier Gomez

    May 17, 2016 at 4:27 pm

    There is no picture attached to your post.
    Could it be that you are not using a monospaced font ?

    Xavier

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy