beautypg.com

Property attributes and methods, Expression reference), Property – Adobe After Effects CS4 User Manual

Page 683: Attributes and methods (expression reference), Property attributes and, Methods (expression reference), Attribute returns a property. look up, From

background image

677

USING AFTER EFFECTS CS4

Expressions

Last updated 12/21/2009

Property attributes and methods (expression reference)

value

Return type: Number, Array, or String.

Returns the value of a property at the current time.

valueAtTime(t)

Return type: Number or Array.

Argument type: t is a Number.

Returns the value of a property at the specified time, in seconds.

For example, to have a property value for each frame chosen randomly from a set of four values, set your four values
as keyframes at 0, 1, 2, and 3 seconds, and then apply the following expression to the property:

valueAtTime(random(4))

Note: Dan Ebberts provides more examples and techniques for using the valueAtTime and velocityAtTime methods on
his

MotionScript website

.

velocity

Return type: Number or Array.

Returns the temporal velocity value at the current time. For spatial properties, such as Position, it returns the tangent
vector value. The result is the same dimension as the property.

velocityAtTime(t)

Return type: Number or Array.

Argument type: t is a Number.

Returns the temporal velocity value at the specified time.

speed

Return type: Number.

Returns a 1D, positive speed value equal to the speed at which the property is changing at the default time. This element
can be used only for spatial properties.

speedAtTime(t)

Return type: Number.

Argument type: t is a Number.

Returns the spatial speed value at the specified time.

wiggle(freq, amp, octaves=1, amp_mult=.5, t=time)

Return type: Number or Array.

Argument type: freq, amp, octaves, amp_mult, and t are Numbers.

Randomly shakes (wiggles) the value of the property.

freq value is the frequency in wiggles per second.

amp value is the amplitude in units of the property to which it is applied.

octaves is the number of octaves of noise to add together. This value controls how much detail is in the wiggle. Make
this value higher than the default of 1 to include higher frequencies or lower to include amplitude harmonics in the
wiggle.

amp_mult is the amount that amp is multiplied by for each octave. This value controls how fast the harmonics drop
off. The default is 0.5; make it closer to 1 to have the harmonics added at the same amplitude as the base frequency, or
closer to 0 to add in less detail.

t is the base start time. This value defaults to the current time. Use this parameter if you want the output to be a wiggle
of the property value sampled at a different time.

This manual is related to the following products: