How to create splashscreen with button?

edited November 2016 in How To...

Hi there,

Can anyone please help me with generating code for a splash/intro screen?

What I'd like is for an intro page at the start that the user would click "play" for and the next part of the application would start?

I only want a basic page with a play button.

Thank you!

Tagged:

Answers

  • edited November 2016

    If by "splash screen" you mean an image that appears on start, then disappears after x time:

    1. Make a very simple sketch that shows an image. Look upimage() and imageLoad in the reference.

    2. Make the sketch show the image only IF less than x time has passed. Look up millis() in the reference for finding the time since start.

    3. To make it clear with a click instead, create a true/false variable (a boolean) like splashClicked. Look up mouseClicked() -- when clicked, IF your variable was false, make it true. When drawing, IF it is true, don't show the image.

    Share your code if you get stuck and have questions!

Sign In or Register to comment.