Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › help with expressions

  • help with expressions

    Posted by Duran1 on June 24, 2006 at 6:41 pm

    HI i’m fairly ne to after effects and epressions. I have been making small motion graphics and i ran into a small snag when trying to add two movement expressions to one camera. the code i’m useing is as follows:

    t = time – key(2).time;
    if (t< 0){ value; }else{ veloc = 18; amplitude = 55; decay = 4; y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t); value + [y,0]; } The problem I am havin is that I have two seperate times when I want this movement to affect different text, but whenever I try anything such as duplicating the code for example After effects does it for one and not the other. This might be a really stupid problem to have but I figure it's better to ask. thanks Duran

    Dan Ebberts
    replied 20 years, 3 months ago
    2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 24, 2006 at 7:54 pm

    Are you trying to trigger the bounce at two different keyframes? If so, what’s supposed to happen between the keyframes?

    Dan

  • Dan Ebberts

    June 24, 2006 at 8:15 pm

    Assuming you don’t want to trigger a vibration at every keyframe, I’d use something like this and just put a layer marker wherever you want the vibration to occur:

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n == 0){
    value;
    }else{
    t = time – marker.key(n).time;
    veloc = 18;
    amplitude = 55;
    decay = 4;
    y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    value + [y,0];
    }

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy