DES 251 Digital Media Design III

After Effects Expressions

So called "Expressions" can be added to transformations in After Effects. This is particular helpful if you need to repeat/loop motion.

Below some helpful Expressions:

Loop

After you created you animation with keyframes, click the transformation's stop watch icon in the layer menu and paste the following code

loopOut()


Wiggle

After you created you animation with keyframes, click the transformation's stop watch icon in the layer menu and paste the following code

wiggle(5,10)

That will make the layer wiggle 5 times per second up to 10 pixels in any direction. Adjust the 2 numbers to alter the speed and wiggle amount.

If you need to control when the wiggle starts and ends, use this code:

timeToStart = 5; timeToStop = 10; if ((time > timeToStart) && (time < timeToStop)) { wiggle(5,10); } else { value; }

This will start the wiggle expression after 5 seconds and makes it stop after 10 seconds.