Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Turn Layer on based on Range Slider?

  • Lukasz Pason

    January 22, 2015 at 12:22 am

    It’s probably ugly but it works.

    if (comp("MAIN COMP").layer("AUTO SCRIPT CONTROLLER - CONTINENT").effect("Slider Control")("Slider") != 6) {
    0
    };
    else { 100 };

    Motion Designer / DJ / Father
    http://www.lukaszpason.com
    http://www.krop.com/lukasz

  • Dan Ebberts

    January 22, 2015 at 12:26 am

    If you want the expression to turn on the layer with the index that matches the slider, you could do it like this:

    s = comp(“MAIN COMP”).layer(“AUTO SCRIPT CONTROLLER – CONTINENT”).effect(“Slider Control”)(“Slider”);
    if (Math.round(s) == index) 100 else 0

    Dan

  • Lukasz Pason

    January 22, 2015 at 1:00 am

    Totally didn’t think about doing it that way. I’d only have to make sure that the layers are properly arranged. Thanks Dan!

    Motion Designer / DJ / Father
    http://www.lukaszpason.com
    http://www.krop.com/lukasz

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