Copy link to clipboard
Copied
Hey!
I'm building out a template right now for a client and trying to add font-change capabilities via slider expression where they can easily change the slider amount to change the font in all comps. The slider expression works properly, but when I added it into the source text section it seems to now only read that expression and stops reading the other expression.
The other expression is just a simple pick whip to a master text layer where the client can change the text and have all text layers auto-update to whatever they change it to.
So basically, I am trying to get every text layer to 1. auto-update based on the master text layer and 2. give the client the ability to change fonts via the slider selection expression.
But it seems that the text layer is only reading the expression that is last. So if I put the font change expression last, then I can change fonts but the text won't update when I change the word in the master comp. And vice versa.
Here is my current expression within the text layer (text layer contains a Slider effect control as well):
var fontArray=[ "UARugged-Regular", "UARugged-Fill", "UARugged-Outline", "LegendSansSerif", "LegendScript" ] ;
v=Math.round(effect("Slider Control")("Slider")); style.setFont(fontArray[v]);
comp("EDIT INFO/COLORS").layer("Touchdown").text.sourceText;
Any ideas on what to do? I'm not super experienced when it comes it to using multiple expressions on layers, so I'm not sure if it's possible to use two different expressions within the Source Text area. Any help is welcome!
Thanks!
I haven't tested this, but I think if you just rearrange things a bit, it should work:
var txt = comp("EDIT INFO/COLORS").layer("Touchdown").text.sourceText;
var fontArray=[ "UARugged-Regular", "UARugged-Fill", "UARugged-Outline", "LegendSansSerif", "LegendScript" ] ;
v=Math.round(effect("Slider Control")("Slider"));
style.setText(txt).setFont(fontArray[v]);
Copy link to clipboard
Copied
I haven't tested this, but I think if you just rearrange things a bit, it should work:
var txt = comp("EDIT INFO/COLORS").layer("Touchdown").text.sourceText;
var fontArray=[ "UARugged-Regular", "UARugged-Fill", "UARugged-Outline", "LegendSansSerif", "LegendScript" ] ;
v=Math.round(effect("Slider Control")("Slider"));
style.setText(txt).setFont(fontArray[v]);
Copy link to clipboard
Copied
Dan! As always, you are a genius. Thank you so much! It worked and saved me a ton of time. REALLY APPRECIATE your help!