i want my background to scroll horizontal. This is my Code
It 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?
1 2 3 4 5 6 7 8 9 | 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()); } |