Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to set range

  • Posted by Tom Hilfiger on January 12, 2020 at 4:27 pm

    Hello! Does anybody can help me with the problem of setting range?

    For example, if “Y Rot” value of slider control layer falls into the range from 1 to 10 then opacity of another layer should be set to 100%. Otherwise it should be 0%.
    Thanks!

    Andrei Popa replied 6 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    January 12, 2020 at 5:30 pm

    You need to put the expression in opacity and link it to the slider. Something like this, although you should pickwhip the slider into the expression

    var mySlider = thisComp.layer("Control Layer").effect("Y Rot")("Slider");//here you should pickwhip your slider

    (mySlider>=1 && mySlider <=10) ? 100 : 0;

    Andrei
    My Envato portfolio.

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