public void next(int width, int height) {

	if (nextIndex+2 < nextCoord.size()) {
		nextIndex = (nextIndex+2)%nextCoord.size();
		xcoord = ((Integer)nextCoord.get(nextIndex)).intValue();
		ycoord = ((Integer)nextCoord.get(nextIndex+1)).intValue();
	} else {
		// stop animation
		setAnimation(false);
		isDone = true;
	}
	
	if (nextIndex2+2 < nextCoord2.size()) {
		nextIndex2 = (nextIndex2+2)%nextCoord2.size();
		xcoord2 = ((Integer)nextCoord2.get(nextIndex2)).intValue();
		ycoord2 = ((Integer)nextCoord2.get(nextIndex2+1)).intValue();
	} else {
		isDone2 = true;
	}
	
	if (nextIndex3+2 < nextCoord3.size()) {
		nextIndex3 = (nextIndex3+2)%nextCoord3.size();
		xcoord3 = ((Integer)nextCoord3.get(nextIndex3)).intValue();
		ycoord3 = ((Integer)nextCoord3.get(nextIndex3+1)).intValue();
	} else {
		isDone3 = true;
	}
}