Hi Folks,
I have a student that has created an onEvent where some aspects seem to run and others do not. The rest of her code looks fine and we have tried to troubleshoot from a variety of directions, but nothing seems to work.
In the below code the onEvent works as intended by setting a new screen
- However the console does not print the message “Rules Button clicked”
- The “screen changed” console log does not print.
- the function drawAllBubbles does not get called
- However, the final console log does print.
onEvent(“rulesButton”, “click”, function( ) {
console.log(“Rules Button Clicked”);
setScreen(“rulesOfGame”);
console.log(“screen changed”);
drawAllBubbles(25);
console.log(“End of on event”);
});
Any help or suggestions would be greatly appreciated.