Description
Expressions are quick scripts that can affect modify input values, from the expression itself or another object in AE, and then apply them to a specific Layer property. Expressions can be static throughout time or dynamicly changing as time progresses.
Adding an Expression
To Activate an expression:
- Select and expand the layer target layer's properties
- Locate a specific property, for example, scale
- hold down ALT and left click the little stopwatch near the property
- (notice the text box that appears where keyframes should go?)
- you can delete the default text and substitute a value of your own. 50 for example.
Try the following expressions
[50, 50]
[50+10, 50-10] x=25; [50, x]
x=5; y=60; [x+y, x-y]
[random(1, 100), 100]
- remember text values need "text" with quotations, while numeric values need numbers, Also if a property has 2 values, your expression should return 2 values as well.
Inputing Data from Other Sources
When using expressions you can use the data from another property or even another layer.
Example
- Using the steps above, activate the expression on a Layer's Opacity property.
- Now, Locate the little spiral button in the expression
- scrub the timeline to see the effect over time
Advanced Expressions
- To see more expressions you can use the built-in library to help you pick and choose your expression.
- Help->Expression Reference... ...for specific detail on what each expression does.