Hi,
I have a online exam, which takes scores and calculates once all the questions are answered. I want to change a few things among them being the calculation will occur even if all the questions aren’t answered, so it won’t be tied to completing every questions as it currently is.
The code I currently have is:
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<=7; 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*;
circ_total.score.text = tScore
_parent._parent.circ_total.score.text = tScore
_parent._parent.btnSave.gotoAndStop("enabled");
}
}
the instance names of the buttons holding the scores is circ_1,circ_2,circ_3 etc, and the mc which displays the totals is circ_total.
let me know if I need to explain anything better/further.