-
Beginner’s AE-expression problem
Hi,
I’m completely unfamiliar with expression and I’m looking for a solution to my most likely very simple problem. I’m trying to create a composition in which there is X amount of layers and I would like to create an expression to control the opacity of each layer every frame.
So I’d like to have a 24fps comp where I first play 1 frame from the first layer, then 1 frame fro the second layer, 1 frame from the 3rd layer etc. UNTIL I reach the final layer of the composition after which I would like to go back to to the first layer and start over again ( layer 1,2,3… then layer 1,2,3… etc)
So far I have created a Null object (named Control) and added this expression to the Slider control
”
xxx= Math.abs(Math.round(1))+1+(time*24);
if (xxx> (thisComp.numLayers-1)) *????????????????????* else xxx”
And the following expression to the Opacity of all other layers:”
if (thisComp.layer(“Control”).effect(“Slider Control”)(1) == index) 100 else 0
”So basically I’m asking with what I should replace “*????????????????????*” or is this even a sensible way to achieve what I’m trying to do?