User Guide

319
ADOBE AFTER EFFECTS 5.0
User Guide
Expression values
The value of an expression is the value of the last statement evaluated. For example, in the
following expressions the results are the same:
x = rotation * 10; [x, 20]
[rotation * 10, 20]
Expression time
Time within an expression is always measured in seconds. The default time for any
expression is the current composition time at which the expression is being evaluated. The
following expressions both use the default composition time and return the same values:
this_comp.layer(1).position
this_comp.layer(1).position.value_at_time(time)
To use a relative time, add a time value to the “(time)” argument. For example, to get a
value at a time 5 seconds before the current time, use the following expression:
this_comp.layer(1).position.value_at_time(time-5)
Expression time in nested comps
Default time references to properties in nested compositions use the original default
composition time, not remapped time. However, if you use the “source” function to
retrieve a property, the remapped time is used.
For example, if the source of a layer in the parent composition is a nested composition,
and in the parent composition you have remapped time, when you access the position
values of a layer in the nested composition with the following expression, the position
values use the compositions default time:
comp("nested comp").layer(1).position
However, if you access layer 1 using the “source” function, the position values use the
remapped time:
source.layer(1).position
Note: If you use a specific time in an expression, After Effects ignores the remapped time.
UG.book Page 319 Wednesday, February 21, 2001 12:05 PM