hello,
does anybody know how i can stop a (JavaScript) loop from running by clicking a button??
i was thinking of something like this: if(button1.onClick() )
regards
I haven't really used JavaScript in brio yet, but what you could do is have the loop check a (global) bool variable every time it loops, and create a button that changes the value of that variable.
while (condition) {
... program code here...
if (b_stopvariable) break;
}
button1.onClick() {
b_stopvariable = true;
}
I don't see why that wouldn't work, I can't test it, so I couldn't tell you... but give it a shot
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.