i want my background to scroll horizontal. This is my CodeIt does but after a few seconds the background starts getting pixelated for a short period and after that the right non pixelatedbackground comes back. Can somebody tell me what i have to change?
public void drawBackgroundImage() {
if (imageCount < -bgImage.getWidth()) {
imageCount += bgImage.getWidth();
}
int temp = imageCount;
getBackground().drawImage(bgImage, 0, temp);
getBackground().drawImage(bgImage, 0 , temp + bgImage.getWidth());
getBackground().drawImage(bgImage, 0, imageCount - bgImage.getWidth());
}
