Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Moddify expression digital clock need to make go to 100 minutes

  • Moddify expression digital clock need to make go to 100 minutes

    Posted by Dalibor Mitic on October 28, 2016 at 9:02 pm

    Hi guys.
    I have reading the forum quite a while now, and found a lot of answers, thank you for that.
    I am very good with after effects but i have 0 knowledge about programming.

    I am trying to modify one expression but i cant do it on my own, so can someone please help me.
    I have expression that is basically a 60 minutes clock starting from 0:0:0 and go to 59:59 and than resets and starts from 0 again.
    Can i make it to go to 100 minutes, so not to be 1:40:00 but actually 99:59 or pass that mark, but not to transfer to hours but go pass 59 minutes and go to 99 minutes for example or go even beyond that

    Can someone help with this, i will highly appreciate it.
    Thank you in advance.

    countspeed = 1;
    clockStart =0;//Change the time of start

    function times(n){
    if (n < 10) return "0" + n else return "" + n
    }

    clockTime = clockStart +countspeed*(time - inPoint);

    if (clockTime < 0){
    minus = "-";
    clockTime = -clockTime;
    }else{
    minus = "";
    }

    t = Math.floor(clockTime);
    h = Math.floor(t/3600);
    min = Math.floor((t%3600)/60);
    sec = Math.floor(t%60);
    ms = clockTime.toFixed(3).substr(-3);
    minus+ times(min) + ":" + times(sec)

    Dalibor Mitic replied 9 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 28, 2016 at 10:52 pm

    I’m not sure, but this might be what you want:


    countspeed = 1;
    clockStart =0;//Change the time of start

    function times(n){
    if (n < 10) return "0" + n else return "" + n
    }

    clockTime = clockStart +countspeed*(time - inPoint);

    if (clockTime < 0){
    minus = "-";
    clockTime = -clockTime;
    }else{
    minus = "";
    }

    t = Math.floor(clockTime);
    min = Math.floor(t/60);
    sec = Math.floor(t%60);
    minus+ times(min) + ":" + times(sec)

    Dan

  • Dalibor Mitic

    October 29, 2016 at 2:43 am

    It is working.
    Thank you so much Dan, you saved me.

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