public void nextFrame() {
		switch (frames) {
		case 2:
			if (count == 0) currentImg = img1;
			if (count == 1) currentImg = img2;
			count++;
			if (count > frames) count = 0;
			break;
		case 3:
			if (count == 0) currentImg = img1;
			if (count == 1) currentImg = img2;
			if (count == 2) currentImg = img3;
			count++;
			if (count > frames) count = 0;
			break;
		}
	}