Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link parameter to markers with fade ins and outs

  • Link parameter to markers with fade ins and outs

    Posted by Andy Bay on September 29, 2018 at 3:50 pm

    Hi!

    I have created a bunch of markers on a layer and would like to have the scale property of that layer to go from zero to a 100 and the back to zero around those markers. In other words, when we hit a marker, it should display the layer at a 100% scale and then ease back to 0% scale until the next marker comes along. Would this be doable?

    Thank you very much!

    Für Infos über Dortmund besuche https://www.dortmundforum.com

    Andy Bay replied 7 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 29, 2018 at 4:10 pm

    Something like this maybe:


    dur = .2;
    n = s = 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;
    s = ease(t,0,dur,100,0);
    }
    [s,s]

    Dan

  • Dan Ebberts

    September 29, 2018 at 4:31 pm

    This might be better:


    dur = .2;
    n = s = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    }
    if (n > 0){
    t = time - marker.key(n).time;
    if (t < 0){
    s = ease(t,-dur/2,0,0,100);
    }else{
    s = ease(t,0,dur/2,100,0);
    }
    }
    [s,s]

    Dan

  • Andy Bay

    October 2, 2018 at 8:17 am

    Works perfectly!

    Thank you so much Dan, I’m always amazed at your helpfulness around here!

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