Forum Replies Created

  • Tobias Gommer

    June 16, 2009 at 11:26 am in reply to: Change expression at a certain point in timeline

    Okay I have been playing with this and I found out the 2nd paramater in the linear function is actually some sort of delay. My problem turned out the 2nd function did run, except it showed the endCounter result. When the expression is fired, the counter is already counting at the same time as the first counter. So when the movie reaches 6seconds it has already been there in the background. So I came up with this
    go = 0;
    if (time < 7){ doCounter(0,10000,5); } if(time >= 7){
    doCounter2(10000,1000,12);
    }

    function doCounter(startCount,endCount,countDur){
    s = "" + Math.round(linear(time,0,countDur,startCount,endCount));
    return s;
    }

    function doCounter2(startCount,endCount,countDur){
    s = "" + Math.round(linear(time,6,countDur,startCount,endCount));
    return s;
    }

    I couldn´t find some sort of reference list of all the expressions, although I found Dan´s site and some others, but there´s no index or something. Thanks for reading this.

  • Tobias Gommer

    June 16, 2009 at 8:05 am in reply to: Change expression at a certain point in timeline

    Hi Dan, thanks for your time! I went along with “time” and I ended up with this the following: I thought It was going to count up to 10.000 and after 6 seconds it would count down to 1000. Cleary I’m wrong because the output it undefined. (this is al happening at a textlayer)

    if (time <6){
    doCounter(0,10000,5);
    }
    else if (time > 6){
    doCounter(10000,1000,5);
    }

    function doCounter(startCount,endCount,countDur){
    s = "" + Math.round(linear(time,0,countDur,startCount,endCount));

    if (s.length > 3){
    s.substr(0, s.length -3) + "." + s.substr(-3);
    }else{
    s
    }
    }

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