I'm sure it's somewhere on the forum was an example of what you need but I can not find it.
So when player sprite is touch edge of game window, game window skip forwart moves about the size of what is total size of the game window. (in up down left or right)
So camera should scrolls for example every 800 pix pixels (left and right) but 480 pix (up and down)