decorative banner

Using expressions


    Expressions can create a relationship between two properties. For example, if a layer rotates and has the Drop Shadow effect applied, you can add an expression to the Rotation property to link the rotation values with the Drop Shadow's Direction values so that as the layer rotates, the drop shadow changes accordingly. See Creating expressions with the pick whip.

    Note: The After Effects Production Bundle also includes Motion Math scripts (see Using Motion Math (PB only)). Some scripts may be easier to use than expressions; for example, to create effects that synchronize all the audio layers in a composition, use the cmpaud.mm script, or to scale and reposition all layers in a composition, use the scaleall.mm script.

    Expressions are based on the standard JavaScript language--but you don't need to know JavaScript to use expressions. Instead, you can create expressions by using the pick whip, by using simple examples and modifying them to suit your needs, or by chaining objects and methods together using the expression language guide (see After Effects expression language guide). If you have even a basic understanding of JavaScript, you can write expressions that create sophisticated relationships between layer properties.

    To learn about the more powerful aspects of JavaScript, consult a JavaScript reference manual, such as JavaScript: The Definitive Guide, by David Flanagan.

    Note: After Effects uses only the core standard JavaScript language, not the Web browser-specific extensions. Instead of Web browser extensions, After Effects contains its own set of extension objects such as Layer, Comp, Footage, and Camera that you can use to access most of the values in an After Effects project.