Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Please help with my Countdown

  • Please help with my Countdown

    Posted by Ryan Johnson on January 23, 2007 at 5:18 pm

    I’ve played with someone else’s expression to get close to what I need.
    I still can’t figure out how to get rid of the first zero digit ( 05:00 )
    here’s my code :

    beginMin =5;
    beginSec = 0
    beginTime = beginMin*60 + beginSec*0;
    function digits(myVal,myNumDigits){
    var s = myVal.toString();
    while (s.length < myNumDigits) s = '0' + s; return s;} currTime = beginTime - time; min = digits(Math.floor((currTime%3600)/60),2); sec = digits(Math.floor(currTime)%60,2); min + ":" + sec this stuff is new to me so any help would be appreciated ! Ryan

    Ryan Johnson replied 19 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 23, 2007 at 5:49 pm

    This should do it:

    beginMin =5;
    beginSec = 0
    beginTime = beginMin*60 + beginSec*0;
    function digits(myVal,myNumDigits){
    var s = myVal.toString();
    while (s.length < myNumDigits) s = '0' + s; return s;} currTime = beginTime - time; min = Math.floor((currTime%3600)/60); sec = digits(Math.floor(currTime)%60,2); min + ":" + sec Dan

  • Ryan Johnson

    January 23, 2007 at 6:45 pm

    Thanks !!! You Should Be Known As ” Dan Dan the Expression Man !!! ”

    Ryan

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