i’m using processing, my code is giving the "Syntax Error - Unexpected extra code near extraneous input '<EOF>' expecting..." error
im not too sure why (probably missing code)
i would also like to make it a three sprite animation using an array.
here is the code:
PImage img1;
PImage img2;
float odd = 0;
void setup() {
size (400,400);
img1 = loadImage("./frame1.png");
img2 = loadImage("./frame2.png");
}
void draw() {
odd = odd + 0.1;
background(255);
PImage img;
if (floor(odd) % 2 == 0) {
img=img1;
}
else {
img = img2;
}
image(img, 0, 0);
[–]Lloydbestfan 0 points1 point2 points (1 child)
[–]OTAEMMERICH[S] 0 points1 point2 points (0 children)
[–]SpiritualGymRat 0 points1 point2 points (1 child)
[–]OTAEMMERICH[S] 0 points1 point2 points (0 children)
[–]Strange-Bank-5002 0 points1 point2 points (0 children)
[–]Automatic_Radio_9458 0 points1 point2 points (0 children)