How can I set the text animator selector based on value with expressions?
I have set of text animators each with expression selectors that trigger different actions depending on the value of a drop down expression control on a control layer. So far this works great, but I need the based on value to change from words to lines or vice versa depending on another drop down control. Is there a way to add an expression to the based on parameter? Am I meant to add it to the amount expression? Ive tried using a switch like this (a total guess) and though it throws no errors it doesnt actually change the value of the based on parameter...
slctn = thisComp.layer("Controls").effect("Text Animation")("Menu");
switch (slctn)
{
case 1: setText.animator("Opacity").selector("Opacity").basedOn[3];
break;
case 2: setText.animator("Opacity").selector("Opacity").basedOn[4];
};
I am able to use a value and throw command to call the value of the based on parameter like this, so in theory it should be a value I can influence with an expression... right?
basedOn = text.animator("Opacity").selector("Opacity").basedOn.value;
throw basedOn
this throws values of 1,2,3 and 4 for characters, characters excluding spaces, words and lines respectively.
Im at a loss but it feels like this should be possible, I hope someone can help.
thanks
