Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sequential turn layer on

  • sequential turn layer on

    Posted by Alom Ambia on April 17, 2015 at 6:54 pm

    I need help writing an expression that will turn on (or off) a layer in sequence starting from the top of the layer stack in a comp. So, say I have 50 layers, I would like to put the expression in the opacity field which will cause the layer 1 to turn off (after a number of frames determined by variable X) which will then make the next layer visible and then that layer turns of and so on.
    It will make it seem as if the layers are turning on one after another in sequence, the time being determined by the variable X.

    Help will be very much appreciated.
    Thanks.

    Dan Ebberts replied 11 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    April 17, 2015 at 7:34 pm

    This example should turn the layers on and off in sequence with a 15-frame duration for each layer:

    onFrames = 15;
    idx = Math.floor(timeToFrames(time – inPoint)/onFrames)+1;
    if (idx == index) 100 else 0

    Dan

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