As blocks

Hi!

I have a code that sets the frameposition for 2 movieclips. However if you click a button and the _currentframe does not match those in the code the 2 mc’s totally block…


product.onRelease = function(){
	 _root.beginScherm.voorbeeld.companyMC.onEnterFrame = function(){
		   if(this._currentframe == 19){
				_root.beginScherm.voorbeeld.companyMC.gotoAndPlay(20);
	}
		   if(this._currentframe == 36){
				_root.beginScherm.voorbeeld.productMC.gotoAndPlay(2);
				_root.beginScherm.voorbeeld.companyMC.gotoAndStop(1); 
	 delete this.onEnterFrame
	}
}
}
company.onRelease = function(){
	_root.beginScherm.voorbeeld.productMC.onEnterFrame = function(){
		   if(this._currentframe == 50){
				_root.beginScherm.voorbeeld.productMC.gotoAndPlay(51);
 
				}
		   if(this._currentframe == 87){
				_root.beginScherm.voorbeeld.companyMC.gotoAndPlay(2);
				_root.beginScherm.voorbeeld.productMC.gotoAndStop(1);
	 delete this.onEnterFrame
	}
}
}

Is there something i can add to this code to ignore clicks on the buttons if it does not meet the demands in the code? For example by blocking all buttons if not on the frames described in the code?