Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions lighting up layers through a slider?

  • lighting up layers through a slider?

    Posted by Jerry Fines on November 12, 2009 at 4:58 am

    I’m not sure how I’d do this:

    I’d like a slider that, depending on what number it is set at, causes individual layers in the comp to “light up” (full opacity). So if it is at 1 then layer 1 is at 100% opacity, if it is at 2 then layer 2 is at 100% opacity and layer 1 is at 0%. Is this possible?

    Xinlai Ni replied 16 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Xinlai Ni

    November 12, 2009 at 5:45 am

    use this expression for the opacity:
    selectedIndex = Math.floor(thisComp.layer(“Contorl”).effect(“Slider Control”)(1));
    selectedIndex == index ? 100 : 0

    Xinlai Ni
    Software Engineer, Google Inc.

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