Activity › Forums › Adobe After Effects Expressions › Turn off sequentially
-
John Madison
October 3, 2012 at 6:06 pmThanks 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 pmI 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 -
Dan Ebberts
October 8, 2012 at 10:54 pmSomething 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
Reply to this Discussion! Login or Sign Up
