beautypg.com

Footage attributes and methods, Layer sub-objects attributes and methods – Adobe After Effects CS3 User Manual

Page 574

background image

AFTER EFFECTS CS3

User Guide

569

Footage attributes and methods

To use a footage item from the Project panel as an object in an expression, use the global

footage

method, as in

footage("file_name")

, and then use any of the attributes below. You can also access a footage object using the

source

attribute on a layer whose source is a footage item.

width

Return type: Number.

Returns the width of the footage item, in pixels.

height

Return type: Number.

Returns the height of the footage item, in pixels.

duration

Return type: Number.

Returns the duration of the footage item, in seconds.

frameDuration

Return type: Number.

Returns the duration of a frame in the footage item, in seconds.

pixelAspect

Return type: Number.

Returns the pixel aspect ratio of the footage item.

name

Return type: String.

Returns the name of the footage item as shown in the Project panel.

Layer Sub-objects attributes and methods

source

Return type: Comp or Footage.

Returns the source Comp or source Footage object for the layer. Default time is adjusted to the time in the source.
Example:

source.layer(1).position

effect(name)

Return type: Effect.

Argument type: name is a String.

After Effects finds the effect by its name in the Effect Controls panel. The name can be the default name or a user-
defined name. If there is more than one effect with the same name, the effect closest to the top of the Effect Controls
panel is used. Example:

effect("Fast Blur")("Blurriness")

effect(index)

Return type: Effect.

Argument type: index is a Number.

After Effects finds the effect by its index in the Effect Controls panel, starting at 1 and counting from the top.

mask(name)

Return type: Mask.

Argument type: name is a String.

The name can be the default name or a user-defined name. If there is more than one mask with the same name, the
first (topmost) mask is used. Example:

mask("Mask 1")

mask(index)

Return type: Mask.