Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Multiple checkbox expressions

  • Multiple checkbox expressions

  • Sam Nevens

    November 21, 2022 at 3:12 am

    I’m probably making this more complicated than needed, but how does one have multiple expressions tied to multiple checkboxes?

    My goal is to have a one click solution to make an object move up/down/left/right after parenting to a null. I’m trying to build a template and admittedly am undereducated in this realm…

    I appreciate anyone’s wisdom on this…

  • Dan Ebberts

    November 21, 2022 at 7:39 am

    So is your intention for the expression to accommodate all 16 permutations of multiple checkboxes selected or do you want it to work like radio buttons, where only one of the four options can be selected at a time? If it’s radio buttons, you’d be better off using a Dropdown Menu Control and an expression structured like this (I don’t think this is right, but I don’t really understand how it’s supposed to work):

    menu = effect("Dropdown Menu Control")("Menu").value;
    switch (menu){
    case 1:
    speedMultiplier = -5;
    y = value[0];
    x = value[1] + time * speedMultiplier;
    break;
    case 2:
    speedMultiplier = 5;
    y = value[0];
    x = value[1] + time * speedMultiplier;
    break;
    case 3:
    speedMultiplier = 5;
    x = value[0];
    y = value[1] + time * speedMultiplier;
    break;
    case 4:
    speedMultiplier = -5;
    x = value[0];
    y = value[1] + time * speedMultiplier;
    break;
    default:
    x = value[0];
    y = value[1];
    break;
    }
    [x,y]
  • Sam Nevens

    November 21, 2022 at 6:50 pm

    This works perfectly. Thank you!

    I owe you a coffee, will venmo/paypal you if you have it.

    Thanks again!

Viewing 1 - 3 of 3 posts

Log in to reply.

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