There is a section called “joke” I need to retrieve a joke from, and then generate it into text on screen.
This being :
if (chuckData) {
text(chuckData.value.joke, 10, 200);
}
}
I managed to get the text to print on the screen, and it changes the joke on refresh, however: I need to get this effect when using mousePressed() and fail to find out how to do it or find it on the internet.
@kll but how can I get a random joke from the file when continuously clicking?
As I showed in my code: When starting the page, a joke shows.
Continuously clicking should change the joke. Now I am still forced to refresh the page, but now need to click and release to show the joke (when using your example).