-
Is possible to combine style font and source text in expressions?
Hello there!
Simplified Scenario:
I have a Text layer with “Hello” as source text and Georgia as font. This layer has a checkbox. When I click on it (true) I want to change the font style to Arial and the source text to “Bye”.
Im using Javascript as Expression Engine.
This is what I’ve tried, but nothing happend. It just takes one of the else statements, not both:
———————————————————————–var usertext = text.sourceText;
var forcetext = “Bye”;
if (effect(“Checkbox Control”)(“Checkbox”) == 0){
usertext
}
else {
style.setFont(“Arial-BoldMT”);
forcetext;
}
———————————————————————–Any thughts about this?
Thanks in advance community!