Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale change loop

  • Posted by Joel Gamble on September 5, 2011 at 1:48 am

    I am trying to figure out an expression that will scale an object from 105% to 95%, and then from 95% to 105%, continuously through the animation. Each scale (e.g. 95% to 105%) would last 1 second.

    I can’t figure out how to loop the effect. I know how to do this in Java (using if statements, but the syntax isn’t the same in javascript. Below are the lines I have figured (not much, I know…)

    Any help would be greatly appreciated!

    Thanks in advance,

    JG

    linear(time, 0, 1, [105,105], [95,95]);
    linear(time, 0, 1, [95,95], [105,105]);

    Dan Ebberts replied 14 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    September 5, 2011 at 3:44 am

    This should work:


    t = (time-inPoint)%2;
    if (t < 1)
    linear(t, 0, 1, [105,105], [95,95])
    else
    linear(t, 1, 2, [95,95], [105,105]);

    Dan

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