After Effects CS3  |  Go to CS4 Help

Example: Animate scale at each layer-time marker

  Apply the following expression to a Scale property to make a layer wobble at each marker:
  n = 0; 
  t = 0; 
  if (marker.numKeys > 0){ 
      n = marker.nearestKey(time).index; 
      if (marker.key(n).time > time) n--; 
  } 
  if (n > 0) t = time - marker.key(n).time; 
    
  amp = 15; 
  freq = 5; 
  decay = 3.0; 
    
  angle = freq * 2 * Math.PI * t; 
  scaleFact = (100 + amp * Math.sin(angle) / Math.exp(decay * t)) / 100; 
  [value[0] * scaleFact, value[1] / scaleFact];



Comments

Comments are no longer accepted for After Effects CS3. After Effects CS4 is the current version. To discuss After Effects CS3, please use the Adobe forum.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/en_US/AfterEffects/8.0/WSF14C01FA-EE3C-4b8f-A473-39185258B060.html