Adjusting code which calculates scores and activates a submit button

Hi,

the basis of my problem is this. I have inherited some code which is a matrix of buttons which give a score of 1-7 depending on which button is pressed. The matrix consist of 7 rows and columns 7 buttons in each row and once all rows have a button pressed the final score is calculated and a submit button becomes activated (it is de-active until all rows have a score). This works fine, but I have added a function in which you can press another button which de-activates one row and activated another, so there are now 8 possible rows instead of 7, even though I want the total score to still calculate when there are scores of seven rows to tally up the total. The code I have now works with the first 7 rows, but when you add the 8th row it won’t tally up the score, and activate the submit button. I am attaching the code I currently have to do this. I think part of the problem, is that I don’t actually understand every bit of the code. I know what it does, but not exactly how it is doing it :-).

Anyway attached is the current code I am currently using:


function uClickBehScore(mc, rowParent) {
	var codedName = mc._name
	var vStr = codedName.split("_")
	var bNum = Number(vStr[1])
	var bScore = Number(vStr[2])
	_root.scores[bNum] = bScore
	scor = eval("circ_"+bNum)
	scor.score.text = bScore
	
	//use the array split from above to adjust all of ther buttons in this row
	for(var i=1; i<=8; i++)
	{
		vStr[2] = i;
		btn = rowParent[vStr.join("_")]; 
		btn.gotoAndStop("off")
	}
	
	mc.gotoAndStop("on")
	
	if(_root.scores.join().indexOf("0")==-1)
	{
		var tScore = 0;
		for(var i=0; i<_root.scores.length; i++)
			tScore += _root.scores*;
		_parent._parent.circ_total.score.text = tScore
		_parent._parent.btnSave.gotoAndStop("enabled");
	}
}