Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression for switching between compositions

  • expression for switching between compositions

    Posted by N-forced on October 19, 2007 at 10:27 pm

    hey guys

    anyone know of or how to make an expression where you could use a slider control to bring up different compositions? for example having four precomposed compositions of a characters front, back, and two sides and using the slider control to cycle through them so the character would essentially turn around or having a check box control that would control blinking or a slider control that would cycle different mouths for lip syncing, if anyone has any ideas to get me in the right direction it’d be much appreciated

    Mike Clasby replied 18 years, 11 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    October 19, 2007 at 10:49 pm

    A simple way would be to put all the precomps in a master comp, add a slider control to a null (“Null 1”), and add this expression to the opacity of the precomps:

    slider = Math.round(thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”) );
    if (slider == index) 100 else 0;

    Then each layer will be visible when its layer index matches the slider, invisible otherwise.

    Dan

  • N-forced

    October 19, 2007 at 11:39 pm

    awesome it works, thanks alot for your help! got another one for you, is there a way to give the slider a range where it only goes to say 1-4 instead of the infinite number it goes to by default?

  • Mike Clasby

    October 20, 2007 at 1:22 am

    I too like that expression/solution.

    To set the range of a slider, Right Click the blue number values of the slider and choose “Edit Value”, then you can set the min and Max to what you want.

    The default is 0-100, then widest range possible is -1000000 to +1000000.

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