Expressions and Scripting Flashcards
6 cards from real Adobe After Effects practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Expressions and Scripting flashcards as text
What does the `valueAtTime(t)` method do in an After Effects expression?
Answer: Returns the value of the property at a specified time `t` in seconds
valueAtTime(t) samples a property's value at any given time, enabling delay effects, echo trails, and time-offset animations.
What does `effect("Slider Control")("Slider")` do in an After Effects expression?
Answer: References the value of a Slider Control effect applied to the current or target layer
This expression retrieves the current value of a Slider Control effect, letting you drive multiple properties from a single master slider.
What does `Math.sin(time * frequency) * amplitude` create when applied to a Position expression?
Answer: A smooth sinusoidal oscillating motion at the given frequency and amplitude
Math.sin creates a smooth, predictable periodic oscillation — useful for pendulum swings, looping wave motion, or pulsing effects.
What does the `index` expression variable return in After Effects?
Answer: The layer's order number (index) within the composition's layer stack
The `index` variable returns the layer's position in the layer stack (1-based), enabling offset animations that increment per layer.
What does `toComp()` method do in After Effects expressions?
Answer: Converts a point from a layer's local coordinate space to the composition's coordinate space
toComp(point) transforms a 2D or 3D point from the layer's local space into the composition's global coordinate system.
What is the purpose of `try { } catch(err) { }` in After Effects expressions?
Answer: Prevents the expression from throwing a red error and allows fallback behavior when an error occurs
Wrapping expression code in try/catch prevents the red error state and lets you provide a default fallback value if the expression fails.