4 Replies Latest reply on Jul 1, 2010 9:24 AM by joshtownsend

# Is there an expression that lets you switch between layers every other frame?

Kind of like flickering back and forth between two layers. I'm guessing adding an expression to the opacity on the top layer would do it.

Thanks,

Josh

• ###### 1. Re: Is there an expression that lets you switch between layers every other frame?

Something like this applied to the opacity of the top layer:

f = timeToFrames(t = time + thisComp.displayStartTime);
if (f % 2 == 0){
0}
else 100

It's just a simple java test for even numbers

Hope this does what you want.

Another variation would be:

f = time / thisComp.frameDuration;
s = Math.round(f);

if (s % 2 == 0){
0}
else 100

• ###### 2. Re: Is there an expression that lets you switch between layers every other frame?

Perfect!! Thanks,

• ###### 3. Re: Is there an expression that lets you switch between layers every other frame?

Are you trying to give someone an epileptic fit?

• ###### 4. Re: Is there an expression that lets you switch between layers every other frame?

Exactly what I'm trying to do. Getting my 'Gaspar Noe' on.