-
How do you express the word “between” in Expressions?
I’m trying to learn expressions and am trying to write an expression that uses Ease command to control Position and move a layer through 10 seconds and have it move every 2 seconds. I can get through the first 4 seconds but how do I tell AE that if the time is between 4 and 6 I want variable “third” to be executed and if the time is between 6 and 8 I want variable fourth to be executed and so on and so forth. The numbers in the arrays are just random numbers; I’m only trying to learn not actually do anything work realated. This is what I have so far.
var first = ease(time,0,2,[100,100],[600,100]);
var second = ease(time,2,4,[600,100],[100,600]);
var third = ease(time,4,6,[100,600],[20,500]);
var fourth = ease(time,6,8,[20,500],[300,800]);
var fifth = ease(time,8,10,[300,800],[100,100]);
if (time<2) {var movement = first} else {var movement = second};
movementquinnmcguee