Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions video count down question

  • video count down question

    Posted by Isaac on October 2, 2005 at 3:52 pm

    hey guys i have a countdown script and it works perfect. i am wanting to modify it and don’t know how. here is the script:

    //countdown clock in miliseconds
    ClockStart = 20; //Start time in minutes
    start = ClockStart*60; //start time in seconds
    compTime = start – time;
    eTime = Math.floor(compTime);
    csec = Math.floor((compTime – eTime)*100);
    ms1 = Math.floor(csec/10);
    ms2 = csec%10;
    hr = Math.floor(eTime/3600);
    h1 = Math.floor(hr/10);
    h2 = hr%10;
    min = Math.floor((eTime – hr*3600)/60);
    m1 = min;
    m2 = min%10;
    sec = eTime – hr*3600 – min*60;
    s1 = Math.floor(sec/10);
    s2 = sec%10;
    m1 + ‘:’ + s1 + s2 + ‘.’ + ms1 + ms2

    what i am trying to do is count up from 1-5000 over a period of 20minutes. any ideas

    Plans fail for lack of counsel, but with many advisers they succeed.

    Isaac replied 20 years, 7 months ago 2 Members · 5 Replies
  • 5 Replies
  • Colin Braley

    October 2, 2005 at 5:34 pm

    Try this as an expression for source text:

    totalMinutes = 20;//Total time in minutes
    beginVal = 0;
    endVal = 5000;
    //————————————–
    fps = 1 / thisComp.frameDuration;
    secs = 20 * (fps*2);

    Math.floor(linear(time, 0, secs, beginVal, endVal + 1))

    ~Colin

  • Isaac

    October 2, 2005 at 6:34 pm

    sorry i am asking this i pasted my code but it is not printing a value on screen.. am i doing something wrong

    Plans fail for lack of counsel, but with many advisers they succeed.

  • Colin Braley

    October 3, 2005 at 12:47 am

    Are you applying the expression to the source text property of a text layer? If so, what error messages are you getting?
    ~Colin

  • Isaac

    October 3, 2005 at 2:34 am

    yes i am no error… the text outcome is just not showing.

    Plans fail for lack of counsel, but with many advisers they succeed.

  • Isaac

    October 3, 2005 at 12:39 pm

    nevermind… i was trying to do it in my existing file with my timer… for some reason it didn’t work. when i opened a new document and tried.. worked like a charm

    Plans fail for lack of counsel, but with many advisers they succeed.

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