Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Use marker to control where animation starts

  • Use marker to control where animation starts

    Posted by Mervin James on January 24, 2019 at 8:34 pm

    Hi guys looking for some help to do this with an expression. Ive got an In and an Out animation on the position property. What Id like to do is control the out animation with a marker so I can just shift the marker and the out animation would be triggered where ever the marker is on the timeline. I know this can be done in AE 2019 with Responsive Design but Responsive Design doesnt work in earlier versions I dont think. Can anyone help out with this please. Any responses is greatly appreciated.

    Mervin James replied 7 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 24, 2019 at 9:05 pm

    How are you doing it now (without the marker)?

    Dan

  • Mervin James

    January 25, 2019 at 5:57 am

    I am doing it by shifting the keyframes. Alternatively id like to add a marker to make things easier. Also I am new to AE so im still figuring alot of things out. If you can help my utmost thanks to you.

  • Dan Ebberts

    January 25, 2019 at 6:05 am

    The expression needs to know which keyframe starts the out animation. For this example, I’ve assumed it’s the 3rd keyframe:


    outKey = 3;
    if (time > key(outKey-1).time){
    m = marker;
    n = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (m.key(n).time > time) n--;
    }
    t = n > 0 ? time - m.key(n).time : 0;
    valueAtTime(key(outKey).time + t);
    }else{
    value;
    }

    Dan

  • Mervin James

    January 25, 2019 at 6:20 pm

    It’s working perfectly Dan. Many thanks.

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