
660
USING AFTER EFFECTS CS4
Expressions
Last updated 12/21/2009
Expression language reference
Use the After Effects expression elements along with standard JavaScript elements to write your expressions. You can
use the Expression Language menu at any time to insert methods and attributes into an expression, and you can use
the pick whip at any time to insert properties.
If an argument description contains an equal sign (=) and a value (such as t=time or width=.2), then the argument
uses the included default value if you don’t specify a different value.
Some argument descriptions include a number in square brackets—this number indicates the dimension of the
expected property or Array.
Some return-value descriptions include a number in square brackets—this number specifies the dimension of the
returned property or Array. If a specific dimension is not included, the dimension of the returned Array depends on
the dimension of the input.
The W3Schools JavaScript reference website provides information for the standard JavaScript language, including
pages for the JavaScript Math and String objects.
More Help topics
“Expression basics” on page 646
“Expression examples” on page 683
Global objects, attributes, and methods (expression reference)
comp(name) Return type: Comp.
Argument type: name is a String.
Retrieves another composition by name.
footage(name) Return type: Footage.
Argument type: name is a String.
Retrieves a footage item by name.
thisComp Return type: Comp.
Represents the composition containing the expression.
thisLayer Return type: Layer, Light, or Camera.
Represents the layer containing the expression. Because thisLayer is the default object, its use is optional. For
example, you can start an expression with
thisLayer.width or width and get the same result.
thisProperty Return type: Property.
Represents the property containing the expression. For example, if you write an expression on the Rotation property,
you can start an expression with
thisProperty to refer to the Rotation property.
time Return type: Number.
Represents the composition time, in seconds, at which the expression is being evaluated.
colorDepth Return type: Number.
Returns the project color depth value. For example, colorDepth returns 16 when the project color depth is 16 bits per
channel.
Komentáře k této Příručce