Adobe 65008009 - After Effects CS4 Using Manual page 673

User guide
Hide thumbs Also See for 65008009 - After Effects CS4:
Table of Contents

Advertisement

Last updated 12/21/2009
Comp attributes and methods (expression reference)
Return type: Layer, Light, or Camera.
layer(index)
Argument type: index is a Number.
Retrieves the layer by number (order in the Timeline panel). Example:
Return type: Layer, Light, or Camera.
layer(name)
Argument type: name is a String.
Retrieves the layer by name. Names are matched according to layer name, or source name if there is no layer name. If
duplicate names exist, After Effects uses the first (topmost) one in the Timeline panel. Example:
thisComp.layer("Solid 1")
layer(otherLayer, relIndex)
Argument type: otherLayer is a Layer object, and relIndex is a Number.
Retrieves the layer that is relIndex layers above or below otherLayer. For example,
returns true if the next layer down in the Timeline panel is active.
1).active
Return type: MarkerProperty.
marker
Important: You cannot access a composition marker by marker number. If you have a project created in a previous
version of After Effects that uses composition marker numbers in expressions, you must change those calls to use
instead. Because the default name of a composition marker is a number, converting the reference to
marker.key(name)
use the name is often just a matter of surrounding the number with quotation marks.
Return type: MarkerKey.
marker.key(index)
Argument type: index is a Number.
Returns the MarkerKey object of the marker with the specified index. The index refers to the order of the marker in
composition time, not to the name of the marker. For example, this expression returns the time of the first composition
marker:
thisComp.marker.key(1).time
Return type: MarkerKey.
marker.key(name)
Argument type: name is a String.
Returns the MarkerKey object of the marker with the specified name. The name value is the name of the marker, as
typed in the comment field in the marker dialog box, for example,
default name is a number. If more than one marker in the composition has the same name, this method returns the
marker that occurs first in time (in composition time). The value for a marker key is a String, not a Number. For
example, this expression returns the time of the composition marker with the name "0":
thisComp.marker.key("0").time
Return type: MarkerKey.
marker.nearestKey(t)
Argument type: t is a Number.
Returns the marker that is nearest in time to t. For example, this expression returns the time of the composition marker
nearest to the time of 1 second:
thisComp.marker.nearestKey(1).time
This expression returns the time of the composition marker nearest to the current time:
Return type: Layer, Light, or Camera.
thisComp.layer(3)
thisComp.layer(thisLayer,
. For a composition marker, the
marker.key("1")
667
USING AFTER EFFECTS CS4
Expressions

Advertisement

Table of Contents
loading

This manual is also suitable for:

After effects cs4

Table of Contents