Copy link to clipboard
Copied
Hey there,
I have a great little expression that generates a sentenance.
compName = thisComp.name;
textBefore = "The amount totals to ";
textAfter = ".";
textBefore+compName.substring(0, compName.indexOf("-"))+textAfter;
The amount totals to five.
How do I change the color of the compName and textAfter values?
I
Copy link to clipboard
Copied
You don't. These are not scriptable with source text expressions. You will have to apply a text animator for Fill color, which in fact per your example would be the simplest solution, anyway, by setting it to per word and adjusting the range settings to always cover that last word. More complex string manipulation may of course require a different approach involving an expression selector or soem such thing, but give this a whirl as a start.
Mylenium
Copy link to clipboard
Copied
Thanks Mylenium,
Yes added range selector in the animator and it got me out trouble. Thank you for responding so quickly 🙂