ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# try to understand

FAQ   •   VIEW ALL
 try to understand on Apr 30, 2020 at 4:00:42 pm

Hi,
i am new and try to understand the logic. When i run this on position property:

a = [100, 500];
b= [1000, 500];
AB = linear(time, 0, 3, a, b);
BA = linear(time, 3, 6, b, a);

or
a = [100, 500];
b= [1000, 500];
BA = linear(time, 3, 6, b, a);
AB = linear(time, 0, 3, a, b);

its always second "linear" command works. Why?

 Re: try to understandon Apr 30, 2020 at 4:43:24 pm

It always puts in the last variable defined. You'll need an if-statement telling the expression when to activate which variable.

```a = [100, 500]; b= [1000, 500]; AB = linear(time, 0, 3, a, b); BA = linear(time, 3, 6, b, a); if (time&lt;3) {AB} else {BA}; ```

 Re: try to understandon Apr 30, 2020 at 4:44:09 pm

Sorry the < symbol alway gets messed up..

 Re: try to understandon Apr 30, 2020 at 4:57:38 pm

:(

 Re: try to understandon Apr 30, 2020 at 5:14:34 pmLast Edited By Tunc Erenkus on Apr 30, 2020 at 5:17:52 pm

ah ok, fixed with < symbol, i see what you mean. thanks for reply.

i am thinking about loop my solid between A - B, without keys/markers and loop command... is it possible?