Question
Create a dropdown that chooses the text alignment
Hi! As for the new update with the text styling expressions, it was amazing yet I cannot get the results that I need such as having a dropdown that controls the alignment of the text to center, left, and right.
This is the expression that I am using: It still does not work but I do not have expression errors anymore
var dropdown = thisComp.layer("Control Layer").effect("Alignment")("Menu");
var myStyle = text.sourceText.style;
switch (dropdown.value) {
case 1:
myStyle.setJustification("alignLeft"); // Left Justify
break;
case 2:
myStyle.setJustification("alignCenter"); // Center Justify
break;
case 3:
myStyle.setJustification("alignRight"); // Right Justify
break;
}
myStyle;
