We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have written a program in processing. However I need to load my logo before the program starts and display it for one second.
How do I go about it? I tried
void setup(){
size(200,200); logo = loadImage("cover.png"); logo.resize(200,200); image(logo,0,0);
delay(1000);
...
}
but all that does is it just introduce a delay. I understand this is because setup calls the image(, , ) command just once, displays the image and then goes over to the delay command.
But I can't call this in void draw since I want to show the logo just once.
So how do I go about this issue?
Answers
you can use the concept of states. A state tells you, in which state or screen the sketch is:
You can do it in the draw() :
And in one line :
Common Questions: How do I display a message for a few seconds?