ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

creating 'universal' variable within a comp

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brady Baltezore
creating 'universal' variable within a comp
on Jun 3, 2020 at 6:02:51 pm

I'm looking to expand on an expression.

I've got a large number of layers referencing the value contained within an expression slider on a control layer.
So when I change the value of that slider, each expression referencing it changes accordingly. No problem here.

What I'd like to do now is use another slider effect to create a value that I can then use to say, stagger the values of some of the individual layers.

frame lag, for an example:


EXCEPT, instead of "time-1*thisComp.frameDuration" I'd like to be able to plug in the reference to an second expression slider.

Pardon my syntax but something along the lines of:

Can anyone point me in the right direction? I feel like it's possible but I'm going about it the wrong way.



Return to posts index

Andrei Popa
Re: creating 'universal' variable within a comp
on Jun 4, 2020 at 7:29:20 am

I just think you need to insert a ("Slider") before value.


However, I would do it like this, to be easier to read:

diff = thisComp.layer("expressionControl").effect("variableSlider")("Slider").value;

My Envato portfolio.

Return to posts index

Brady Baltezore
Re: creating 'universal' variable within a comp
on Jun 7, 2020 at 9:08:48 pm

Awesome, thanks for responding!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved