-
Time based position ‘slide’ expression jumps when triggered with marker
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.zipThank 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]
}