I found some code at smilebasicsource.com by JamieYellow and wrote an example around it. For your own code you will have to adapt it for map size and file names. Mine was shorter than a screen vertically so add some code to handle scolling on the y axis in your code too. Good luck. For this to work use scsave in the map editor, not the normal save button.