FORUMS: list search recent posts

# Position Expressions

FAQ   •   VIEW ALL
 Position Expressions on Aug 1, 2014 at 6:49:28 am

I've been doing successfully with increasing the y position of my comps with position+[0,(index-1)*1000] and got to the position from 0 to 49000... however now I want it to go backwards towards 0.

Can't really figure out how to do it...

Can anyone lend me a hand?

 Re: Position Expressionson Aug 1, 2014 at 10:27:12 am

Probably better for the Ae Expressions forum here -- but many here can help too.

You'll have to be more descriptive of what you want to do. Are you trying to animate the position of all the layers back to 0, or set a static position? Please be as specific as possible about what you want to see to get the best help.

Walter Soyka
Motion Graphics, Widescreen Events, Presentation Design, and Consulting

 Re: Position Expressionson Aug 1, 2014 at 11:42:50 am

Thanks for your prompt reply. Didn't realize there was an expression forum... will post there next time.

What I want to do is to increment the y position for each layer and then decrease it again.

Using position+[0,(index-1)*1000] the first layer starts from 0, 2nd 1000, up to the 50th which is 49000. Now I want the 50 layers after this to decrease from 49000 back to 0. i.e. 51 y position at 48000, 52nd at 47000 and so forth.

I hope I manage to explain properly..

 Re: Position Expressionson Aug 1, 2014 at 1:27:13 pm

Something like this would work, but I'm not sure it's the best solution. It really all depends on how much you want to animate it after it collapses. This expression says, at 1 second on the timeline, start collapsing. The collapse animation will happen for 1.5 seconds. Just change the start and duration values to your liking. Any animation after the collapse though would have to be done with keyframing (unless further work was done with the expression).

start=1;
duration=1.5;
t=time;
expand=value+[0,(index-1)*1000];

if (t < start) expand
if (t >= start) ease(t,start,start+duration,expand,value)

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman

 Re: Position Expressionson Aug 2, 2014 at 11:23:13 pm

I haven't tested this, but it should be close:

if (index <= 50)
position+[0,(index-1)*1000]
else
position+[0,49000 - (index-50)*1000]

Dan