2 Replies Latest reply on Apr 13, 2016 9:25 AM by Gutterfish

    using a slider control to turn layer opacities on & off?

    Gutterfish Adobe Community Professional

      I have a series of 9 mouth images for a lip synch.

      (If there is a better way (which I'm sure there is) to achieving what the following want's to achieve please let me know)

      I'm wondering if there's a way to create a slider control (value 1-9) that will effect the opacities of the 9 layers accordingly (turning them on and off) as the slider's value raises.

      Something along the lines of

      if(effect slider > 0 || effect slider < 1.1)  ((thisComp.layer("mouth_0001_eee.png").tramform.opacity = 100) else (thisComp.layer("mouth_0001_eee.png").transform.opacity = 0)


      Obviously I don't have much scripting experience.  This expression would have to be re-written for each layer with a different range (0 - 1.1 , 1.1 -  2.1 , 2.1 - 3.1 , ect)


      As I type this it seems highly inefficient, like I almost might as well just animate each layers opacity directly.

      Is there an efficient way to do what I am imagining?