We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I would like a frame count animation with one image but different timing based on the frameCount(i guess that a timer would also work here). I made the image to blink however i would also like the image to stop after 4 seconds and then to continue blinking after 5 seconds. This is what i got so far.
int blink = frameCount%40;
if(blink> 10) {
image(blinkImg, 1052, 403);
}
Not much :/.
I also have a question concerning arrays. I have loaded multiple images with an array and they need to blink as well, stop after some time and then continue. Do you increase the elements by one in the array like this? I saw an example here http://www.learningprocessing.com/exercises/chapter-9/exercise-9-6/ but it's not working for me.
for(int i=0; i < img.length-1; i++) {
img[i] += img[i+1]; // this is not working
image(img[i], 120, 200);
}
}
Thanks
Answers
Something I still don't get it: Are the PImage pics supposed to be displayed at once or 1 at a time? :-??
They are two separate questions. For the second they should be displayed one at a time, in the same time interval, then stop for some seconds and then continue again.
Another thing: By blinking you meant rotating the displaying of the PImage[]? ^#(^
Yes rotating at a given time interval, stopping for awhile and looping again.
Dunno if I got you right but... here it is my blueprint of it: (~~)
Enlightenment :D. That was a great example thank you so much :).