Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions link a slider to Y scale and assign a specific value to represent 100% y scale

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

    Posted by Idris Oulmane on August 14, 2017 at 2:59 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]

    Idris Oulmane replied 9 years ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    August 14, 2017 at 3:30 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

  • Idris Oulmane

    August 16, 2017 at 2:50 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]

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy