There are many ways of doing it. Like checking the maps X and Y values. So for example if you don't want the map to go more than -600px to the left then setup the events like this: if maps x is less than -600 then set map X to -599
And do this to limit left, right, top and bottom scrolling <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
You can also do it with sprites like this: https://dl.dropboxusercontent.com/u/100 ... 2/map.capx
There are many other ways to do it so I can't say this is the best one. But it works <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">