Forum Replies Created

  • Tufekoa Durcanof

    January 26, 2010 at 8:25 am in reply to: 5 Minute Countdown

    Hi,

    First of all thank you very much Dan for this thread it’s really very helpful for the expression dummies like me. 🙂

    I am doing a countdown for 5:00 and am having an error message on line 6 like 2 other people.

    I am using your first expression: (on a text layer on which i wrote 5:00)

    rate = -1;
    clockStart = 300;

    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); min + ":" + padZero(sec) I can't see what the problem is.
    rate = -1;
    clockStart = 300;

    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);
    min + ":" + padZero(sec)

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