motion graphics eXchange

Expressions triggered by a marker

No thumbnail available
Here is an expression for having a marker trigger a squish and squash. Put the expression on Scale.
After Effects 7
Useful things

Views: 16965
visit |  share this  error? 
(Copy the expression, Alt-Click the Scale stopwatch, Paste):
n = 0;
if (marker.numKeys > 0){
  n = marker.nearestKey(time).index;
  if (marker.key(n).time > time){

if (n == 0){
} else {
  max_dev=20; // max deviation in pixels
  spd=35; //speed of oscillation
  decay=10; //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];
So wherever you place a marker you'll get the old squish and squash. Hit the asterisk (*) key on the numeric pad to drop a marker wherever you are on the timeline.
Note: No marker, no squish and squash. Five markers give five squish and squashes.
Also if you're talking a diferent expression, just drop that in below the }else{.
by Mike Clasby (yikesmikes)

(Min. Version: After Effects 7, Category: Useful things, Type: Expressions)
posted by MicGyver on Feb 15, 2009


Related topics:

Folding Template

Thumbnail for: Folding Template
folding and unfolding template free to use.
Require After Effects CS6
After Effects CS6
Projects (aep)

Views: 53258
posted by fsimoni on Nov 05, 2012

Product, Service or App Promotion

Thumbnail for: Product, Service or App Promotion
After Effects Template. Promote your app, product or service
After Effects CS5
Useful things
Projects (aep)

Views: 28974
posted by RedSpikeFx on Oct 30, 2012

Clean Logo V2

Thumbnail for: Clean Logo V2
After Effects CS4,CS5,CS5.5 and CS6 template logo reveal
After Effects CS4
Projects (aep)

Views: 34516
posted by aedaddy on Aug 19, 2012



follow us on in touch on facebook