Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Multiple checkbox expressions

  • 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!

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