Not sure why you reset your x coord, tilePos = -50 when you draw the next line?
Thats off the canvas
Easier - just have the x coordinate as x*25
or even 40+x*25 (say if you want a 40 pixel margin)
similarly your tileTop (y) coordinate could just be y*25
it will save you doing all the tilePos counting which is where the error is anyway.
Also you reset your image and reload your picture source every turn of the loop. That would be better done before the for loops start!
See 3 posts Below for my re-write!
Last edited by donna1; 12-05-2012 at 03:06 AM..