So I want to make a text in a text box keeps changing and changes back between two strings.
Two given strings, for example, "This" and " That" in one text box and i want to make them switch to one another after few seconds.
Is it possible to do it with Corvid?
Because I have tried something like
while (true) {
if (textChanged) {
setTimeout(() => {
$w("textbox1").text = "This";
}, 4000);
} else {
... ...
}
}
But it seems Wix does not allow infinite loop and I am stuck now.
Can anyone help? Thanks.
While I realise I'm posting to a 3 year old question, I find myself needing the exact same help. Jim, if you figured it all out, would you be so kind as to maybe share your code? I'm clueless, even after reading and watching video tutorials.
Use setInterval()
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval