ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Invert 0% and 100%

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Filip Stillerska
Invert 0% and 100%
on Dec 21, 2018 at 2:34:46 pm

I've got two value sliders (not necessarily Slider Controls though) on different layers that have a range between 0% and 100%. I want value A to be the "opposite" of value B; for example, when value A is 100% value B should be 0%; when value A is 0% value B should be 100%; when value A is 50% value B should be 50%; when value A is 20% value B should be 80% and so on...
I hope that my explanation is understandable.


Return to posts index

Thomas Hannen
Re: Invert 0% and 100%
on Dec 21, 2018 at 3:36:42 pm

Assuming slider A is limited to values between 0 and 100, slider B just needs to be a value of 100 minus the value of slider A.
You can do this like this:


The expression in Slider B's value is:
100-(effect("Slider Control A")("Slider"))


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]