ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Define Case in Switch statements

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Christian Simpson
Define Case in Switch statements
on Sep 27, 2017 at 9:50:35 pm

Instead of having my expression use the number of the layer in the pop up drop down how can I have it use the name of the item in the drop down. For example I don't want the expression below to use the number but the actual text for the case. So the case would be Air Force, Akron, and Alabama for example.

var num = comp("test comp").layer("Null 2").effect("Home Team")
("Home Team").value;
switch(num) {
case Air Force:
theText = "Air Force";
break;
case 2:
theText = "Akron";
break;
case 3:
theText = "Alabama"
break;
default:
theText = "Team Name"
}
theText


Return to posts index

Dan Ebberts
Re: Define Case in Switch statements
on Sep 27, 2017 at 10:23:18 pm

As far as I know, there's no way for an expression to access the text associated with a dropdown selection.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]