Quote: "when you hit the edge of the screen, you move to another room (screen) and showing up on the other screen depending on the last x and y value the sprite has touch the edge of the screen"
So like the old Zelda game on Nintendo?
In my zelda clone, I use to arrays to accomplish this task. The first holds the information of the map you're currently interacting with. When you reach the edge of the map (in any direction) you load up the information of the second screen into the second array. Display that 2nd portion of the map and offset it to be right next to the current map. As the first map slides over, the 2nd map slides with it.
Once it has completely shifted, I load the first array with the data from the 2nd and update the collision map. Basically, the 2nd map is only used when shifting between screens as the 1st map is always used to draw the screen.

"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke