Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Fade in and out on each marker

  • Fade in and out on each marker

    Posted by Andrei Popa on October 10, 2018 at 5:06 pm

    I need an expression that i thought would be simple but it seems i can’t get it. I want the opacity to go 0-100 in 10 frames, hold 10, fade out in 10. And all these before each marker.

    Basically the animation starts one second before each marker, split in 3. Fade in, stay, fade out. And stays zero for the rest of the duration.

    Andrei
    My Envato portfolio.

    Andrei Popa replied 7 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 10, 2018 at 5:28 pm

    Try this:


    m = marker;
    n = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (m.key(n).time <= time){
    n++;
    if (n > m.numKeys) n = 0;
    }
    }
    if ( n > 0){
    t = m.key(n).time - time;
    if (t > .6667){
    linear(t,.6667,1,100,0);
    }else if (t > .3333){
    100;
    }else{
    linear(t,0,.3333,0,100);
    }

    }else
    0;

    Dan

  • Andrei Popa

    October 11, 2018 at 7:40 am

    Magic, again. Thank you very much.

    Andrei
    My Envato portfolio.

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