-
set a slider to control expressions inside a comp and making it work on multiple instances of the comp
I just followed an incredibly nice old tutorial on how to create an odometer like counter in AE.
So far so good. Now I made a precomp that contains this odometer and a null with a slider that controls the odometer.
so I have expressions that begin with
slider = thisComp.layer("controller").effect("Slider Control")("Slider");
The problem is I’d like to have multiple instances of this odometer and I want each instance to count to a different number. In order to do this, I have to duplicated the odometer comp and change the slider inside the null.
This means if I need 100 counters I’ll have 100 different composition in the project browser and that is not optimal at all.
How do I make this more flexible? It would be cool to have a slider in the effect controls panel of the odometer itself so that I could animate a value for each instance.I tried to do so, but pick-whipping the slider contained in the odometer comp effects gets referenced with an absolute path like follows:
pippo = comp("lots_of_counters").layer("counter1").effect("Slider Control")("Slider")
so this won’t work, I need some kind of relative path to the slider.I hope I’ve been clear enough so that you guys can understand!