Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression Slider for Opacity of Multiple Layers

  • Expression Slider for Opacity of Multiple Layers

    Posted by Kay Nender on January 12, 2009 at 9:33 pm

    Hello Folks,

    I’m trying to write an expression that will allow me to have 1 of several layers visible at a time, but still retain control over when each is visible.

    I *think* I can do this with a each layer’s opacity mapped to a different numerical value on a slider, but am really stuck on how to do this. Is there a standard way? Am I going about this completely backwards?

    Thanks a million for your thoughts.

    Kay

    Henadzi Buto replied 15 years, 8 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    January 12, 2009 at 9:56 pm

    Say you apply you slider to a Null that you name “control”. Then an opacity expression like this should do the trick:

    visibleOne = thisComp.layer(“control”).effect(“Slider Control”)(“Slider”);
    if (Math.floor(visibleOne) == index)100 else 0

    Dan

  • Kay Nender

    January 12, 2009 at 10:16 pm

    That is brilliant! Exactly what I was looking for! Now I’m off to save loads of time…

    Thanks Dan!

    Kay

  • Henadzi Buto

    August 23, 2010 at 12:43 am

    Wow! Thank Dan!

    Belarus, Minsk

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