Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Turn off sequentially

  • Navarro Parker

    October 1, 2012 at 11:20 pm

    Works like a charm! Thank you!!

  • John Madison

    October 3, 2012 at 6:06 pm

    Thanks Dan, but I have another question if you dont mind!

    I am trying to run a parallel expression to the one you gave me above (turn off sequentially from bottom up and then back down again). I am using the brightness effect to dim the layers that are visible, but I dont want it to affect the top visible layer.

    So the idea is the layers turn on from bottom up but they are all dim (for arguments sake this is set to -1) except the top layer which is still unaffected. I tweeked your expression and it works the first time around (i.e when they are turning on from bottom up) but not when they are turning off from top down. Is this making sense?

  • Dan Ebberts

    October 3, 2012 at 9:09 pm

    I would think something like this would work:


    for (i = 1; i <= thisComp.numLayers; i++)
    if (thisComp.layer(i).transform.opacity > 0) break;
    if (i == index) 100 else 0

    Dan

  • Navarro Parker

    October 8, 2012 at 9:52 pm

    How about the opposite of this? So it’s just one layer visible at a time?

    Photobucket

  • Dan Ebberts

    October 8, 2012 at 10:54 pm

    Something like this maybe:


    fOn = 3;
    fOff = 1;
    f = timeToFrames(time);
    idx = Math.floor(f/(fOn + fOff));
    if (idx == (index -1))
    if (f%(fOn+fOff) >= fOn)
    0
    else
    value
    else
    0

    Dan

  • Navarro Parker

    October 8, 2012 at 11:37 pm

    Works great! Thank you.

Page 2 of 2

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