## CC/Transcription via external CSV

Add closed captions or data driven graphics to your After Effects project using .csv files that a source text layer pulls data from.

## Auto-Resize Shape Layer with Text Size

Quick expression that will auto-resize a shape according to a text layer size.

## After Effects Workspace Here is an example of my typical After Effects workspace. I like to have my Project Files on the far left with the Effects Control Panel to the right of it. This allows me to select any layer from the Comp’s Timeline and immediately see the effects applied to the selected layer without having to manually open the Effects Panel. I also keep my Motion Tracking panel next to the Timeline and below the Effects and Presets so I can quickly enter into Motion Tracking mode.

## Flicker Opacity Expression

```//FLICKER OPACITY
if (n<=0) 0 else 100;```

## Oscillate Position on X-Axis Expression

```//OSCILLATE POSITION BACK AND FOURTH ON X AXIS:
amplitude = 10;
frequency = 3;
temp=amplitude*Math.sin(time*frequency)+amplitude;
// add the result to the current x pos
temp=temp+transform.position;
//plug the new x into slot 0. y is currently left unchanged
[temp, transform.position]```

## Make a Layer Bounce Expression

```//MAKE A LAYER BOUNCE:
bounceSpeed=7;
flight=01;
bounceHeight=3.5;
t=Math.abs((time*2*bounceSpeed)%2-1);
t=linear(t,flight,0,0,1);
b=Math.cos(t*Math.PI/2);
value - [0,bounceHeight*b];```

## Flicker in to 100% Opacity Expression

```//FLICKER IN TO 100% OPACITY:
flickerFrequency = 150;

op = value;
if(op > 0 && op < 100){
reverseAmt=100-transform.opacity;
wiggledAmt=wiggle(flickerFrequency,reverseAmt);
roundedAmt=Math.round((wiggledAmt/100));
roundedAmt*100;
}```

## Bounce on Marker Event Expression

```//BOUNCE ON MARKER EVENT (put in scale):
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n--;
}
}
if (n == 0){
value;
} else {
max_dev=20; // max deviation in pixels
spd=20; //speed of oscillation
decay=6; //how fast it slows down
t = time - marker.key(n).time;
s = max_dev*Math.sin(spd*(t))/Math.exp(decay*t);
value + [s,s];
}```

## Pendulum Swing Expressions

```//PENDELUM SWING:
veloc = 10;  //how fast it swings
amplitude = 50;  //how high
decay = .999;
amplitude*Math.sin(veloc*time)/Math.exp(decay*time);
```
```————————————————————————————

//PENDULUM SWING ON MARKER EVENT(put in rotation):
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n--;
}
}
if (n == 0){
value;
} else {
veloc = 10;  //how fast it swings
amplitude = 100;  //how high
decay = 4;
t = time - marker.key(n).time;
s= amplitude*Math.sin(veloc*t)/Math.exp(decay*t);
value + s;
}
```

## Oscillate Layer in an Elipse Expression

```//OSCILLATE LAYER IN AN ELLIPSE: