andom text:
have 2 textboxes both dynamic with variable names: num1 and num2 respectively
add code:
num1 = random(100)+1;
num2 = random(100)+1;
this make the textbox (called num1) show a random number from 1 to 100 (without the +1 it would be 0-99) and same for num2
make another textbox (this time input) var name answer.
make a movieclip called tick with 3 frames called blank, tick and cross. The first frame needs a stop();
now make a button called check and add this code to it:
on (release) {
if (num11+num21 == answer1) {
_root.tick1.gotoAndStop("tick");
num11 = random(100)+1;
num21 = random(100)+1;
answer1 = "";
} else if (num11+num21 !== answer1) {
_root.tick1.gotoAndStop("cross");
} else {
_root.tick1.gotoAndStop("blank");
}
}
have 2 textboxes both dynamic with variable names: num1 and num2 respectively
add code:
num1 = random(100)+1;
num2 = random(100)+1;
this make the textbox (called num1) show a random number from 1 to 100 (without the +1 it would be 0-99) and same for num2
make another textbox (this time input) var name answer.
make a movieclip called tick with 3 frames called blank, tick and cross. The first frame needs a stop();
now make a button called check and add this code to it:
on (release) {
if (num11+num21 == answer1) {
_root.tick1.gotoAndStop("tick");
num11 = random(100)+1;
num21 = random(100)+1;
answer1 = "";
} else if (num11+num21 !== answer1) {
_root.tick1.gotoAndStop("cross");
} else {
_root.tick1.gotoAndStop("blank");
}
}