i am new to this forum and new to ae expressions. i have a little animation where i use an expression to animate few masks on a white line to simulate a drive on a road by moving the middle of the road stripes. (hope you get what i mean as i am german and my english not so good) To reach my goal i use an expression on the move effects combined with a keyframed slider to raise the speed the masks move dynamically to simulate a speed raisement. below you see two screenshots of my animation and here is the expression on the "Move" effect's "move center point to" property:
Code: Select all
rate = effect("Slider Control")("Slider"); // Animation in pixels per frame x = 0; y = rate * timeToFrames(time); value + [x,y]
The slider has 3 keyframes (0, 5, 30). Now, there appear to be 2 major problems:
1) after the 3rd keyframe passed the speed slows down. i could absolutely not figure out why. i solved it (so i thought) by adding a 4th keyframe right 1 frame behind the 3rd and setting it to 75. Thus when the 3rd keyframe passed the speed stays optically continual. BUT...
2) ... now, after a while the whole animation stops. my guess is the problem described in this thread here in forum as the second value of the "move centerpoint to" property is 170750 at this time.
so my questions are:
a) why does the speed slow down as described under 1 ? why isn't it continued till the end of the comp?
b) how would i need to implement the "reset" part of the expression in the linked thread to my code?
i would really find it out myself but i dont understand the whole thing as i am a greenhorn with no experience on expressions. could you please send me the light and help me fix my problem?
regards from germany,