Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions control specific scale property values with a slider control.

  • control specific scale property values with a slider control.

    Posted by Luis Florez on August 28, 2016 at 10:50 pm

    hi

    I want one slider to control the scale property like this; if the slider control is any value from 0 to 50, I want a layer to be 50, anything else same as the slider.
    I am using this expression to accomplish it, but it is not working.

    s = comp(“comp”).layer(“layer”).effect(“effect”)(1);
    linear(s,0,100,50,100)

    i have tried this one too to identify the two properties.

    s = comp(“MAIN DESIGN”).layer(“MAin Control”).effect(“Logo Texture Size”)(1);
    linear(s,0,100,50,100);[value[0], value[1]]
    this one doesnt show errors but doesnt work.

    it seems to me I am writing it wrong because the scale property has two values.
    how can I fix it to accomplish what I want?

    I used it in the opacity property and it works fine but not in the scale property.

    I dont know how to write expression, I am learning.

    Any help will be much appreciated.

    Luis

    s = comp("comp").layer("layer").effect("effect")(1);
    linear(s,0,100,50,100)

    Live your life with passion

    Luis Florez replied 9 years, 12 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 29, 2016 at 12:20 am

    I think it will looks something (not exactly though) like this:

    slider = comp(“comp”).layer(“layer”).effect(“Slider Control”)(“Slider”);
    s = Math.max(slider,50);
    [s,s]

    Dan

  • Luis Florez

    August 29, 2016 at 5:25 am

    yes. Dan. thank you so much. it works perfectly.
    I dont know how you do that.
    Amazing.

    one more question though.

    Live your life with passion

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