We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have gotten some code already but im still not sure how to change it for what i want I want to slow down the speed of the images being shown. If i could i would love to move away from the function mousePressed. If i could move to people not having to click and just working over where there mouse is that would be cool.
So question (in bullet form)
I want to slow the speed that the imgs apear
i want to use mouse over vrs mousePressed.
if there are some tutorials you want to link to or if you just want to show me some examples. I want to completely understand the code i use.
The code i have now:
PImage[] images = new PImage[22]; PImage img = new PImage(); float x; float y; int r;
void setup() { size(1000,1000); for (int i = 0; i < images.length; i ++) { images[i] = loadImage( i +".jpg"); } } void draw() { if(mousePressed) { for(int count = 0;count<20;count ++) { r=int(random(22)); image(images[r],mouseX,mouseY); } } }
Answers
Hi, not tested, as I have no pictures, but should draw a different random picture at mouseX, mouseY each 20 frames.
that makes the photos apear slower but it only shows one random photo then its the same photo.
Try this code, I've used
frameCount
https://processing.org/reference/frameCount.html