Hello, I am a first grade teacher and a beginner when it comes to actionscript. I am attempting to make a sight word game where the student starts off with 0 points and attempts to identify a sight word based upon an oral prompt. I have three buttons for each question and have one as the correct response. On the correct button I put the following action:
on (release) {
if (first == 1) {
first = 0;
result += 1;
}
gotoAndPlay (3);
}
On the incorrect buttons I am putting the following:
on (release) {
first = 0;
gotoAndPlay (3);
}
At the end I used a dynamic text box to display the following:
stop ();
finalresult = int((result/6)*100);
if (finalresult<50 ) {
comment6 = "You got only "+finalresu lt+" % "+"of the answers right. Let's study hard and get a higher score next time!";
} else if ((finalresult>8 0) && (finalresult<70 )) {
comment6 = "You got "+finalresu lt+" % "+" of the answers right. Not bad, but still improvable. Read, read, and read some more!.";
} else if (finalresult>99 )&& (finalresult<80 )) {
comment6 = "You got amazing "+finalresu lt+" % "+"of the answers right. You are on your way to perfection!.";
} else if (finalresult=10 0) {
comment6 = "You got amazing "+finalresu lt+" % "+"of the answers right. Perfect score! You are on your way to being an excellent reader!";
}
Yet, when I test the movie it always comes up as 0% no matter how many I answer correct. I would greatly appreciate any hints or tips to get it working.
on (release) {
if (first == 1) {
first = 0;
result += 1;
}
gotoAndPlay (3);
}
On the incorrect buttons I am putting the following:
on (release) {
first = 0;
gotoAndPlay (3);
}
At the end I used a dynamic text box to display the following:
stop ();
finalresult = int((result/6)*100);
if (finalresult<50 ) {
comment6 = "You got only "+finalresu lt+" % "+"of the answers right. Let's study hard and get a higher score next time!";
} else if ((finalresult>8 0) && (finalresult<70 )) {
comment6 = "You got "+finalresu lt+" % "+" of the answers right. Not bad, but still improvable. Read, read, and read some more!.";
} else if (finalresult>99 )&& (finalresult<80 )) {
comment6 = "You got amazing "+finalresu lt+" % "+"of the answers right. You are on your way to perfection!.";
} else if (finalresult=10 0) {
comment6 = "You got amazing "+finalresu lt+" % "+"of the answers right. Perfect score! You are on your way to being an excellent reader!";
}
Yet, when I test the movie it always comes up as 0% no matter how many I answer correct. I would greatly appreciate any hints or tips to get it working.
Comment