I am working on something for beginning English students. The .swf is currently
here in case my explanation is hard to understand.
I have a set of 12 buttons that each have a color name on them. Clicking the start button changes the color of a shirt, and when the student selects a color, there is a message saying whether the selection was correct, and adding to the "You have xxx number out of xxx number correct." This works okay.
I tried to put additional code on the last button, taking it from a tutorial, to add a message and a percentage. The code I have on the button is here:
Code:
finalresult = int((nmbr/12)*100);
if (finalresult<60) {
comment = "That's "+finalresult+"%"+". Study and try again."
} else if ((finalresult>60) && (finalresult<90)) {
comment = "You got "+finalresult+"%"+". Not bad, but you can try again.";
} else if (finalresult>90) {
comment = "That's "+finalresult+"%"+". Great job!";
}
Currently the only percent this works for is 100%. I am not as familiar with this more complicated code (I'm really just a beginner with action script) and I don't know how to troubleshoot it.
There are 12 different labels in the movie and 60 frames because I don't know how to do it all with ActionScript yet. The name of the textbox is "comment" and it only appears in the last label.
Can anyone see how I should change the code?
Thanks