Time Expressions


click to expand

Create a small solid and animate it moving around in the comp. Duplicate the layer and remove the keyframes (by clicking the Position stopwatch) from the top copy. Also on the top copy, add the following expression to the Position property:

thisComp.layer(thisLayer,+1).position.valueAtTime(time-.5)

Duplicate the top copy three times, play the comp and you'll see four layers following the original layer, like a trail. This works because each layer is referring to the position property of the layer below it-layer(thisLayer,+1).position. But after the word position, the phrase valueAtTime(time “.5) means set this layer's position to the position of where the layer below it was half a second ago. Try playing with the .5 to change how close the layers follow each other. If you change it to 2, the layers will be further apart. If you change it to .1, they'll be very close together.




After Effects On the Spot[c] Time-Saving Tips and Shortcuts from the Pros
After Effects On the Spot[c] Time-Saving Tips and Shortcuts from the Pros
ISBN: 1578202396
EAN: N/A
Year: 2006
Pages: 447

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net