Sorry but i'm kind of new to processing and i've never really worked with text before. I was wondering if anyone could help me figure out how to get the transparent words on my sketch to become more solid in colour as the mouse is moved over them individually.
I'm relatively new to processing and I need to make an image array where it goes through pictures when the mouse is clicked. But I'm having trouble and am not really sure how an array works.
Here's one set of coding I tried but i keep getting the null pointer exception and it won't load my pictures.
int numFrames = 5; // The number of animation frames
PImage[] images = new PImage[numFrames]; // Image array
void setup() {
size(504,378);
frameRate(30); // Maximum 30 frames per second
// Automate the image loading procedure. Numbers less than 100
// need an extra zero added to fit the names of the files.
for (int i = 0; i < images.length; i++) {
// Construct the name of the image to load
String imageName = "Journeybackyard" + nf(i, 2) + ".jpg";
images[i] = loadImage(imageName);
}
}
void draw() {
// Calculate the frame to display, use % to cycle through frames
int frame = frameCount % numFrames;
image(images[frame], 0, 0);
}
Then I tried,
/*PImage[] images = new PImage[5];
PImage img = new PImage();
float x;
float y;
int r;
void setup()
{
size(504,378);
for (int i = 0; i < images.length; i ++)
{
images[i] = loadImage( i +".JPG");
}
for(int i=0; i < images.length; i ++){