X and y boundary when scrolling

I have a map which I am scrolling up down left and right. Currently the map can be scrolled infinitely. Can somebody share a line of code that sets the x and y limits on the scroll. I need the scroll to stop when it gets to edge of map graphic. I have seen it, just can’t find it. Here is the code for the up scroll.Thanks.


up_btn.onPress = function() {
	this.onEnterFrame = function() {
		_root.container.map_mc._y += 5;
	};
};
up_btn.onRelease = function() {
	delete this.onEnterFrame;
}
up_btn.onReleaseOutside = function() {
	delete this.onEnterFrame;
}