FORUMS: list search recent posts

Time based position 'slide' expression jumps when triggered with marker

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matthew Talesfore
Time based position 'slide' expression jumps when triggered with marker
on Jan 7, 2013 at 8:01:50 pm

Hey everyone,

First time poster, long time reader.

So I am trying to make some text slide at a controllable/duplicatable/constant velocity.
The text drops down and then slides to the right. I was trying to use a marker to delay triggering the slide until the text has dropped down.

I cobbled a couple expressions together which has gotten me really close.
However when the marker triggers the expression, the text jumps to the position it would have been at, if the expression not been delayed.

I think this is due to the time being read as absolute and not relative, which I think is what I need.
I have no idea how to fix this so any help the community can offer would be great.
I have included the CS6 project file.
5174_delayslideexpression.aep.zip

Thank you in advance

n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n--;
}
}
if (n == 0){
value;
} else {
// Throw (move at a constant speed without keyframes)
veloc = 40; //horizontal velocity (pixels per second)
x = position[0] + (time - inPoint) *veloc;
y = position[1];
[x,y]
}


Return to posts index

Dan Ebberts
Re: Time based position 'slide' expression jumps when triggered with marker
on Jan 7, 2013 at 8:10:13 pm

Try it this way:


n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) n--;
}
if (n == 0){
value;
} else {
t = time - marker.key(n).time;
veloc = 40; //horizontal velocity (pixels per second)
value + [t*veloc,0]
}



Dan



Return to posts index

Matthew Talesfore
Re: Time based position 'slide' expression jumps when triggered with marker
on Jan 7, 2013 at 10:48:44 pm

Dan a million thank yous!
Wow, 9min for a response, kind of slow ;)

Your adjustment works brilliantly!
I am not even going to try and pretend that I understand what you did there. I will spend the rest of the month trying to figure it out.

Is there an expression/javascript topic you might recommend I read up on, to better understand this?

Thanks again,

Matthew


Return to posts index


Dan Ebberts
Re: Time based position 'slide' expression jumps when triggered with marker
on Jan 7, 2013 at 11:03:11 pm

The only real change I made was to use the time elapsed since the marker rather than the time elapsed since the layer's in point to calculate the x distance traveled.


Dan



Return to posts index

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