ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How do i change position every "x" seconds i want

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bar Avraham
How do i change position every "x" seconds i want
on Jun 24, 2017 at 9:14:32 pm

Hey i have a layer that i want to change his position.
I want this to change every "x" seconds i choose.

I mean like:

position=[200,500]
wait "4" seconds
now change to [200,600]
wait "3" seconds
now change to [200,790]
.......

Please help. Thank you very much 😄


Return to posts index

Scott McGee
Re: How do i change position every "x" seconds i want
on Jun 26, 2017 at 7:46:09 pm

There's probably an easier way to do this but if you know when you want it to move and for how long this is a messy way to do it

valuea = [200, 500];
valueb = [200,600];
valuec = [200,790];
valued = [500,790];

inPointa = 0;
outPointa = 2;
inPointb = 4;
outPointb = 6;
inPointc = 8;
outPointc = 10;

if (time < outPointa){
ease(time,inPointa,outPointa, valuea, valueb)
} else if (time < outPointb){
ease(time,inPointb,outPointb, valueb, valuec)
} else if (time < outPointc){
ease(time,inPointc,outPointc, valuec, valued)}


If the transistion is always going to be the same you could probably reduce it to this


valuea = [200, 500];
valueb = [200,600];
valuec = [200,900];
valued = [500,900];

inPointa = 0;
inPointb = 4;
inPointc = 8;

if (time < inPointa + 2){
ease(time,inPointa,inPointa +2, valuea, valueb)
} else if (time < inPointb + 2){
ease(time,inPointb,inPointb +2, valueb, valuec)
} else if (time < inPointc +2){
ease(time,inPointc,inPointc + 2, valuec, valued)}


But there's still probably a way to reduce it further or to write it in general, but I'm not that good.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]