Scroll one at a time issue

I’ve set up a scroller that scrolls an MC up or down with two different buttons (up and down). When you press up, the MC rises 390 and when you press down, it lowers 390. The issue I’m having is that if you hit the button while it is scrolling, it screws up the scroller and scrolls off values. Here is the code that I’m using:

onClipEvent (load) {
	_x = 0;
	_y = 0;
	endY = 0;
	div = 5;
	totalImages = 6;
	totalImages = totalImages-2;
	scrollAmount = 390;
	totalHeight = totalImages*scrollAmount;
	totalHeight = -(totalHeight);
	//This value just determines the speed
	//the transistions.
}
onClipEvent (enterFrame) {
	_y += (endY-_y)/div;
	_root.main.aboutMC.tab1.onRelease = function() {
		if (_y>=0) {
			null;
		} else {
			endY = _y+scrollAmount;
		}
	};
	_root.main.aboutMC.tab2.onRelease = function() {
		if (_y<=totalHeight) {
			null;
		} else {
			endY = _y-scrollAmount;
		}
	};
}

Can anyone help me change the code so it will disable the buttons until it has scrolled 390, or whatever value I set it at? I really could use the help PLEASE!

Thanks to anyone who is able to help! :slight_smile: