ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Inverse Property Change

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Corey Erickson
Inverse Property Change
on Apr 9, 2018 at 4:31:40 pm


I'm new to writing expressions... I have done some super basic stuff and copy/pasted expressions I've found online.

Question #1: What would be the best place to learn the language needed to write expressions in after effects?

Question #2: I want to link the Scale of Object_A to the Scale of Object_B, BUT I want the Scale of Object_A to DECREASE as the Scale of Object_B INCREASES.

Return to posts index

Jacob Roth
Re: Inverse Property Change
on Apr 9, 2018 at 7:12:18 pm

The best place for starting to learn how to write expressions is Dan Ebberts' Motionscripts Mastering Expressions.

Dan also is a frequent poster here and can answer almost any expression related question you have.

I also like School of Motion 30 Days of After Effects on YouTube, which have quite a few lessons that walk you through every step of using expressions to achieve a certain effect. Workbench is also a good resource on YouTube.

As to your expression question, I'm new to expressions as well, so I'm looking forward to somebody, probably Dan, answering that question.

Return to posts index

Dan Ebberts
Re: Inverse Property Change
on Apr 9, 2018 at 10:06:57 pm

You could do it a number of ways, depending on exactly how you need it to work. One simple way, assumes both layers start at 100%:

s = thisComp.layer("Object_B").scale;
x = 10000/Math.max(s[0],.1);
y = 10000/Math.max(s[1],.1);

It's not likely this is exactly what you need, but you'll need to provide more info if not.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved