Using Help | Contents | Index Back - Adobe AFTER EFFECTS 5.5 Help Manual

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
property as a "method" when the property takes arguments, or an "attribute" when it does
not.
When writing expressions, keep the following guidelines in mind:
JavaScript is case-sensitive.
Semicolons are required to separate statements or lines.
Spaces between words are ignored.
Saving an expression
Once you have written an expression, you can save it for future use by copying and
pasting it into a text-editing application, such as Notepad, Simple Text, or even Stickies.
However, because expressions are written in relation to other layers in a project and may
use specific layer names, it doesn't always work to simply save and load expressions into a
project. If you want to save an expression for use in another project, you may want to add
comments to the expression or save the entire project file so that you can use it as a
reference when you reuse the expression.
Note: You can save a favorite effect that includes an expression and use it in other
projects, as long as the expression does not refer to properties that don't exist in the other
projects. See "Saving favorite effects for instant reuse" on page 172.
To add comments to an expression:
Do either of the following:
Type // at the beginning of the comment. Any text between // and the end of a line is
ignored. For example:
// This is a comment.
Type /* at the beginning of the comment and */ at the end of the comment. Any text
between /* and */ is ignored. For example:
/* This is a
multiline
comment */
Understanding the expression language
The After Effects expression language is based on JavaScript 1.2, with an extended set of
built-in objects. All expressions start with a global object. Only an attribute or method of
the global object can appear in an expression with nothing to the left of it.
The global object for any expression is the layer on which the expression is written. For
example, if you add an expression to the Scale property of a layer named Solid1 and you
want the expression to return Solid1's Position property values, you can use any of the
following expressions, as they are equivalent:
this_comp.layer("Solid1").position
this_layer.position
position
Using Help
|
Contents
|
Index
|
Index
Creating Expressions
Back
249
Back
249

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents