-
How to change textsize through sourceRectAtTime with if/else based on textwidth?
Hi there…
i was trying to change the textsize by reading the sourceRectatTime width with an if/else condition. It seems like jumping forward backward then (it doesnt work). Do i need to use the loop function? I am very beginner with all this, but try to understand more 🙂 i was trying to make a kind of responsive text or like having breakpoints.
this was my tryout:
var a = thisLayer.sourceRectAtTime();
if(a.width > 600) {
thisLayer.text.sourceText.style.setFontSize(200)
}
else {
thisLayer.text.sourceText.style.setFontSize(100)
};