Expression examples

Many of the examples in this section are based on expressions provided by Dan Ebberts. Dan Ebberts also has an excellent collection of example expressions and tutorials for learning how to work with expressions on his MotionScript website. For example, Dan provides an excellent page about collision detection.

Colin Braley provides a tutorial and example project on his website that show how to use expressions to make one layer repel others in a natural-seeming manner.

The AE Enhancers forum provides many examples and much useful information about expressions, as well as scripts and animation presets. In this post on the AE Enhancers forum, Paul Tuersley provides a tutorial and example project that show how to use expressions to animate several layers in a swarm.

Rick Gerard provides an example on his website that demonstrates rolling a square object along a floor so that the sides stay in contact with the floor plane.

Carl Larsen provides a video tutorial on the Creative COW website that demonstrates how to use expressions and parenting to relate the rotation of a set of wheels to the horizontal movement of a vehicle.

Marcus Geduld provides some examples from his book, After Effects Expressions, on the Focal Press website. In the "String Manipulation" section, Marcus shows how to use basic JavaScript to manipulate the text in the Source Text property of a layer. He even shows how to use an array of strings so that a layer's Source Text property can be set to a specific word from a list. In the "Physical Simulations" section, Marcus shows how to use expressions for orbits, bounces, jiggles, and collision detection.

Chris Zwar provides an example project on his website for automatically arranging still images or videos into a grid (like a video wall). You can easily adjust position and spacing with sliders that are connected to a system of expressions. There are three compositions in the project—one for stills, one for videos, and one to create an auto-storyboard in which a video is sampled at user-defined intervals and aligned into a grid.

JJ Gifford’s website provides several example projects that demonstrate how to use expressions.

Rhys Enniks provides a video tutorial on his website in which he uses expressions and multiple text animators and range selectors to animate text as if it is being typed onto a computer screen.