Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting custom slider values

  • Setting custom slider values

    Posted by Jared Yearsley on September 3, 2014 at 10:36 am

    Hi, hopefully this is an easy question. I’ve got a slider controlling just the x scale of a layer, with code below.

    And want my slider to range from 2 – 7. Which I achieve by editing the slider values. BUT, I want slider value 7, to equal scale 100. And slider value 2 to equal scale 30. Tried googling, but have trouble phrasing it!

    Any one able to guide me in the right direction?

    temp = thisComp.layer("Null").effect("Slider Control")("Slider");
    [value[0], temp];

    Jared Yearsley replied 11 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 3, 2014 at 2:02 pm

    I think you might be looking for something like this:

    temp = thisComp.layer(“Null”).effect(“Slider Control”)(“Slider”);
    y = linear(temp,2,7,30,100);
    [value[0], y];

    Dan

  • Jared Yearsley

    September 3, 2014 at 10:41 pm

    Thanks Dan! It didn’t work, but got me on the right track. After some playing, this seems to work:

    temp = thisComp.layer("Null").effect("Slider Control")("Slider");
    x = linear(temp,2,7,30,100);
    [x, value[0]];

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