ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

link a slider to Y scale and assign a specific value to represent 100% y scale

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Idris Oulmane
link a slider to Y scale and assign a specific value to represent 100% y scale
on Aug 14, 2017 at 2:59:36 pm

Hello creativecow members,

I am new here on this community, and it very resourceful and helpfull. I am facing an issue with After effect expressions because I am a beginner in using expressions.

I am working on chart graphs and I wanted to animate the source text according to the scale of the Y value of the shape, the issue is once I link the source text to the slider controller and I assign then the Y scale value to the slider, the text source become eventually 100 as max of the scale but instead of that I want to show a real value like : the max Y scale value (100) represent for example 2.3 but I didn't find a way to do that but subtracting the difference from the output value

y = thisComp.layer("57%").effect("Slider Control")("Slider");
[100, y-43]

Here is what I would like to explain:

TextSource= X Value
For Max_Slider_Control_Value= (X value)
then Shape_Y_Scale = 100%

For Min_Slider_Control_Value= (X value)
then Shape_Y_Scale = 0%


So when the scale in this is at 100 it will show 57 but when the slider is at 0 the source text becomes -43.

I hope I could explain the problem clearly and some one can help me on this.

Thank you!

y = thisComp.layer("57%").effect("Slider Control")("Slider");
[100, y-43]


Return to posts index

Andrei Popa
Re: link a slider to Y scale and assign a specific value to represent 100% y scale
on Aug 14, 2017 at 3:30:27 pm

Is this what you are looking for? Because i don't quite understand your problem.
y = thisComp.layer("57%").effect("Slider Control")("Slider");
[100, y*57/100]

this will show 0 at 0, and 57 at 100. Replace 57 with anything you want for different result at 100.

Andrei


Return to posts index

Idris Oulmane
Re: link a slider to Y scale and assign a specific value to represent 100% y scale
on Aug 16, 2017 at 2:50:48 pm

Thank you Andrei Popa ^_^ for the Answer, I didn't know how to apply mathematic operations in After Effect but it's exactly what you answered only the right way is (y*100/56)

y = thisComp.layer("56%").effect("Slider Control")("Slider");
[100, y*100/56]


Return to posts index

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