Position Expression Help.

Moderators: Disciple, zlovatt

Post Reply
Reighzin13
Posts: 3
Joined: April 20th, 2009, 10:58 pm

I am new to using expressions in after effects. I was looking to see if people recommend expressions being faster than putting keyframes on every single layer. Which takes up a lot of time.

I have a comp. with 31 layers so far that contains text. Each layer of text is put below each other in the comp until it reaches the end and each layer extends across the whole comp with long sentences. I was wondering if there was an expression to tell the position to move to the left or right without keyframes and at a desired speed. Also if the layer could loop back again when it would reach to the end without motion title.

So far I keyframed layer 1 for 5 seconds, added a motion title, and moved its position to the right. Than I took layer 2 and pick whipped its position to the layer 1 position. I want this layer to move left instead and stay in its same position but animate left where it is from without having to keyframe it. But the layer is moving to layer 1 position and doing the same thing but I want it to stay on the same y-axis and move left.

Reigh
Reighzin13
Posts: 3
Joined: April 20th, 2009, 10:58 pm

Can someone please help me with this? If you don't understand what I am trying to do I will try and explain it a little bit clearer.

Thanks

Reigh
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

Hi Reigh,

i don't exactly understand what you want to achieve. Could you re-explain it ? Or maybe upload a screenshot or two so i can better visualize what you wanna do.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

You could try something like this expression on the Tile Center property of your Motion Tile effect:

Code: Select all

offset = time * 100;
[value[0] - offset, value[1]];
which roughly translates as:
offset = comp time in seconds * 100
[current x value - offset, current y value]

Change the 100 value to alter the speed, and change it from "- offset" to "+ offset" to reverse the direction.
Reighzin13
Posts: 3
Joined: April 20th, 2009, 10:58 pm

Thanks Paul. I tried it and it worked. How did you figure that out? I am a beginner at expressions so things like this amaze me because it was so quick. I will post a pic of what I am trying to accomplish soon. If I have any more questions I will be sure to post another reply.

Thanks.

Reigh
Post Reply