Frame 2
stop();
init();
games = [["AddSingle", ["Add Single", "Suma simple"]], ["AddDouble", ["Add Double", "Suma doble"]], ["SubtractSingle", ["Subtract Single", "Resta simple"]], ["SubtractDouble", ["Subtract Double", "Resta doble"]], ["Multiply5x5", ["Multiply 5x5", "Multiplica 5x5"]], ["Multiply10x10", ["Multiply 10x10", "Multiplica 10x10"]], ["Multiply12x12", ["Multiply 12x12", "Multiplica 12x12"]]];
GameTypeAt = 0;
NamesAt = 1;
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (m == undefined) {
m = "AddSingle";
}
gameType = m;
gameNo = 0;
OptionsArr = new Array();
var i = 0;
for ( ; i < games.length ; i++) {
OptionsArr[i] = games[i][NamesAt][LangNo];
if (gameType == games[i][GameTypeAt]) {
gameNo = i;
}
}
MyRadioGroup.setRadioNames(OptionsArr);
MyRadioGroup.setRadioNum(gameNo);
setupGame();
stop();
Symbol 4 MovieClip Frame 1
if (!hasOwnProperty("_load0BAD0118")) {
_load0BAD0118 = true;
tellTarget ("..") {
function init() {
tellTarget (getProperty("..", _target)) {
basedepth = 100;
answer = 0;
doLang();
}
}
}
} else {
// unexpected jump
}
function doLang() {
tellTarget (getProperty("..", _target)) {
Lang = "en";
if (Lang != "en") {
if (Lang != "es") {
// unexpected jump
LangNo = 0;
LangStart = "Go !";
LangStop = "Stop";
LangSummary = "SUMMARY";
LangTimeIsUp = "Time is Up!";
LangQuitEarly = "(You quit early)";
LangWorkout = "Workout";
LangTime = "Time";
LangMinute = "Minute";
LangSecond = "Second";
LangYouAnswered = "You Answered";
Langandgot = "and got";
Langcorrect = "correct";
LangNeedsImprovement = "Needs Improvement";
LangBetterthanhalf = "Better than half!";
LangWellDone = "Well Done!";
LangNearlyPerfect = "Nearly Perfect";
LangPerfectScore = "A Perfect Score";
LangGoodWorkout = "That was a good workout ... ";
LangTryWorkouts = "Try for three 5-minute workouts a day.";
LangAvgTime = "Average Time";
// unexpected jump
}
} else {
LangNo = 0;
LangStart = "Go !";
LangStop = "Stop";
LangSummary = "SUMMARY";
LangTimeIsUp = "Time is Up!";
LangQuitEarly = "(You quit early)";
LangWorkout = "Workout";
LangTime = "Time";
LangMinute = "Minute";
LangSecond = "Second";
LangYouAnswered = "You Answered";
Langandgot = "and got";
Langcorrect = "correct";
LangNeedsImprovement = "Needs Improvement";
LangBetterthanhalf = "Better than half!";
LangWellDone = "Well Done!";
LangNearlyPerfect = "Nearly Perfect";
LangPerfectScore = "A Perfect Score";
LangGoodWorkout = "That was a good workout ... ";
LangTryWorkouts = "Try for three 5-minute workouts a day.";
LangAvgTime = "Average Time";
// unexpected jump
LangNo = 1;
Title.text = "Matem\u00E1ticas a reacci\u00F3n";
WorkoutType.text = "Entrenamiento";
WorkoutTime.text = "Tiempo";
Minutes.Minutes.text = "Minutos";
LangStart = "\u00A1Vamos!";
LangStop = "Pare";
LangSummary = "Resumen";
LangTimeIsUp = "\u00A1Se acab\u00F3 el tiempo!";
LangQuitEarly = "(Parado temprano)";
LangWorkout = "Entrenamiento";
LangTime = "Tiempo";
LangMinute = "minuto";
LangSecond = "segundo";
LangYouAnswered = "Respondiste";
Langandgot = "y tuviste";
Langcorrect = "correctas";
LangNeedsImprovement = "Necesitas mejorar";
LangBetterthanhalf = "\u00A1M\u00E1s de la mitad! ";
LangWellDone = "\u00A1Bien hecho!";
LangNearlyPerfect = "Casi perfecto";
LangPerfectScore = "Una puntuaci\u00F3n perfecta";
LangGoodWorkout = "Ese ha sido un buen entrenamiento ... ";
LangTryWorkouts = "Haz tres entrenamientos de 5 minutos al d\u00EDa.";
LangHighScores = "R\u00E9cords";
LangAttempt = "Intentar";
LangAvgTime = "Tiempo medio";
QuestionsLabel.text = "Preguntas";
StartInstr.text = "Pulsa 'Vamos' y use el teclado para responder";
Help.Key.text = "Las respuestas del \u00FAltimo 5 eran:";
Help.Bad.text = "Malo";
Help.Good.text = "Bueno";
Help.Perfect.text = "Perfecto";
Speed.Label.text = "Tiempo";
Avg_Speed.Label.text = LangAvgTime;
RightCount.Label.text = "Correctas";
WrongCount.Label.text = "Fallos";
}
LangStopGoBtn = LangStart;
basedepth = 100;
answer = 0;
DummySprite.duplicateMovieClip("Dummy1", 1000);
}
}
// unexpected jump
// unexpected jump
function addPrototypes() {
tellTarget (getProperty("..", _target)) {
String.prototype.replace = function (pattern, replacement) {
return(this.split(pattern).join(replacement));
};
MovieClip.prototype.fade = function (alphastep) {
this._visible = true;
if (alphastep < 0) {
this._alpha = 100;
this.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha + alphastep;
} else {
this._alpha = 0;
delete this.onEnterFrame;
}
};
} else {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + alphastep;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
}
};
}
}
// unexpected jump
// unexpected jump
function getGameType() {
tellTarget (getProperty("..", _target)) {
return(games[MyRadioGroup.getRadioNum()][GameTypeAt]);
}
}
// unexpected jump
// unexpected jump
function getGameName() {
tellTarget (getProperty("..", _target)) {
return(games[MyRadioGroup.getRadioNum()][NamesAt][LangNo]);
}
}
// unexpected jump
// unexpected jump
function restart() {
tellTarget (getProperty("..", _target)) {
RightImg._visible = false;
WrongImg._visible = false;
RightCount.setMe(0);
WrongCount.setMe(0);
totElapsed = 0;
totAnswers = 0;
ResultBox.hideMe();
QText.text = "=";
HistText.text = "";
setupGame();
HighScores.setStt();
Countdown.gotoAndPlay(2);
}
}
// unexpected jump
// unexpected jump
function roll() {
tellTarget (getProperty("..", _target)) {
Question.gotoAndPlay(2);
}
}
// unexpected jump
// unexpected jump
function answered(userAns) {
tellTarget (getProperty("..", _target)) {
if (sttTimer == 0) {
return(undefined);
}
userAns = userAns.split("\r").join("");
if (userAns.length < answer.toString().length) {
return(undefined);
}
if (totAnswers < tryCount) {
elapsed = getTimer() - sttTimer;
Speed.setMe(fmt(elapsed / 1000, 3));
totElapsed = totElapsed + elapsed;
totAnswers = totAnswers + 1;
AvgElapsed = totElapsed / totAnswers;
Avg_Speed.setMe(fmt(AvgElapsed / 1000, 3));
if (userAns == answer) {
RightCount.Incr();
RightImg._visible = true;
WrongImg._visible = false;
HistText.text = (((QText.text + " ") + answer) + newline) + HistText.text;
} else {
WrongCount.Incr();
RightImg._visible = false;
WrongImg._visible = true;
HistText.text = ((((((QText.text + " ") + answer) + " (not ") + userAns) + ")") + newline) + HistText.text;
}
}
if (totAnswers < tryCount) {
roll();
} else {
Result = getSummary();
Score = Math.max(totAnswers - (2 * WrongCount.getMe()), 0) * (60000 / totElapsed);
Result = Result + newline;
Result = Result + newline;
Result = Result + ("Score: " + fmt(Score, 2));
HighScores.addMe(Score);
ResultBox.ShowMe();
ResultBox.Clear();
ResultBox.addMe(Result, HiTryQ);
PlayBtn.fade(10);
}
}
}
// unexpected jump
// unexpected jump
function getSummary() {
tellTarget (getProperty("..", _target)) {
s = LangSummary + newline;
s = s + newline;
s = (("'" + getGameName()) + "'") + newline;
s = s + (((LangAvgTime + ": ") + Avg_Speed.getMe()) + " s\n");
s = s + newline;
s = s + (((((((((LangYouAnswered + " ") + totAnswers) + ", ") + Langandgot) + " ") + RightCount.getMe()) + " ") + Langcorrect) + newline);
PctRight = (100 * RightCount.getMe()) / totAnswers;
s = s + (((("(" + fmt(PctRight, 1)) + "% ") + Langcorrect) + ")\n");
s = s + newline;
Comment = LangNeedsImprovement;
if (PctRight > 50) {
Comment = LangBetterthanhalf;
}
if (PctRight > 75) {
Comment = LangWellDone;
}
if (PctRight > 90) {
Comment = LangNearlyPerfect;
}
if (PctRight == 100) {
Comment = LangPerfectScore;
}
s = s + (Comment + newline);
s = s + newline;
return(s);
}
}
// unexpected jump
// unexpected jump
function fmt(num, digits) {
tellTarget (getProperty("..", _target)) {
if (0 >= digits) {
return(Math.round(num));
}
var tenToPower = Math.pow(10, digits);
var cropped = ((Math.round(num * tenToPower) / tenToPower) add "");
if (cropped.indexOf(".") == -1) {
cropped = cropped + ".0";
}
var halves = cropped.split(".");
var zerosNeeded = (digits - halves[1].length);
var i = 1;
for ( ; zerosNeeded >= i ; i++) {
cropped = cropped + "0";
}
return(cropped);
}
}
// unexpected jump
// unexpected jump
sttTimer = 0;
delete _global.__resolve;
var sttTime;
if (sttTime == undefined) {
var sttTime = null;
}
var endTime;
if (endTime == undefined) {
var endTime = null;
}
_global.__resolve = _global.__debugResolve;
RightImg._visible = false;
WrongImg._visible = false;
totSpeed = 0;
totAnswers = 0;
HiTryQ = false;
tryCount = 20;
Score = 0;
addPrototypes();
// unexpected jump
// unexpected jump
};
stop();
Symbol 6 MovieClip Frame 1
stop();
Symbol 11 Button
on (release) {
getURL("http://www.mathsisfun.com");
}
Symbol 19 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function checkMe(a_radio) {
tellTarget (getProperty("..", _target)) {
var cnt = 0;
for ( ; cnt < pRadio.length ; cnt++) {
if (pRadio[cnt] == a_radio) {
setRadioNum(cnt);
}
}
}
}
}
} else {
// unexpected jump
}
function setRadioNum(a_num) {
tellTarget (getProperty("..", _target)) {
var cnt = 0;
for ( ; cnt < pRadio.length ; cnt++) {
pRadio[cnt].checked = false;
}
pRadio[a_num].checked = true;
pRadioNum = a_num;
}
}
// unexpected jump
// unexpected jump
function getRadioNum() {
tellTarget (getProperty("..", _target)) {
return(pRadioNum);
}
}
// unexpected jump
// unexpected jump
function getRadioName() {
tellTarget (getProperty("..", _target)) {
return(pRadio[pRadioNum].label);
}
}
// unexpected jump
// unexpected jump
function setRadioNames(new_names) {
tellTarget (getProperty("..", _target)) {
delete _global.__resolve;
var cnt;
var a_radio;
_global.__resolve = _global.__debugResolve;
cnt = 0;
for ( ; cnt < new_names.length ; cnt++) {
a_radio = radiobox_default.duplicateMovieClip("radiobox" + cnt, cnt);
a_radio._x = 0;
a_radio._y = cnt * BoxHeight;
a_radio._visble = true;
a_radio.label = new_names[cnt];
pRadio.push(a_radio);
}
}
}
// unexpected jump
// unexpected jump
var pRadioNum = 0;
var pRadio = new Array();
BoxHeight = 24;
// unexpected jump
// unexpected jump
};
stop();
Symbol 20 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function setStatus(val) {
tellTarget (getProperty("..", _target)) {
checked = val;
gotoAndStop((checked ? 1 : 2));
}
}
}
} else {
// unexpected jump
}
function setName(a_name) {
tellTarget (getProperty("..", _target)) {
label = a_name;
}
}
// unexpected jump
// unexpected jump
delete _global.__resolve;
var label;
var checked;
_global.__resolve = _global.__debugResolve;
// unexpected jump
// unexpected jump
gotoAndStop((checked ? 1 : 2));
// unexpected jump
// unexpected jump
};
nextFrame();
play();
Symbol 20 MovieClip Frame 3
tellTarget ("..") {
gotoAndStop((checked ? 1 : 2));
};
gotoAndPlay (2);
Symbol 24 Button
on (release) {
_parent.checkMe(this);
}
Symbol 28 Button
on (release) {
_parent.checkMe(this);
}
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 2
stop();
Symbol 30 MovieClip Frame 1
radiobox_default._visible = false;
stop();
Symbol 36 Button
on (press) {
AInput.text = (AInput.text + 0) - 2;
if (AInput.text < 1) {
AInput.text = 1;
}
_root.tryCount = AInput.text + 0;
}
Symbol 37 Button
on (press) {
AInput.text = (AInput.text + 0) + 2;
_root.tryCount = AInput.text + 0;
}
Symbol 38 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function rollMe() {
tellTarget (getProperty("..", _target)) {
if (!rollingQ) {
x0 = Face._x;
y0 = Face._y;
Value = Math.randomint(6) + 1;
TimeLeft = 16;
rollingQ = true;
}
}
}
}
} else {
// unexpected jump
}
function StopMe() {
tellTarget (getProperty("..", _target)) {
TimeLeft = -1;
rollingQ = false;
}
}
// unexpected jump
// unexpected jump
function drawDots(Size, Color, NumDots, ClearQ) {
tellTarget (getProperty("..", _target)) {
drawOnObj = Face.drawOn;
if (ClearQ) {
drawOnObj.clear();
}
if (NumDots != 1) {
if (NumDots != 2) {
if (NumDots != 3) {
if (NumDots != 4) {
if (NumDots != 5) {
if (NumDots != 6) {
return;
Circle(drawOnObj, 0, 0, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 0, 0, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, -10, Size, Color, true);
Circle(drawOnObj, -10, 10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, -10, Size, Color, true);
Circle(drawOnObj, -10, 10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
Circle(drawOnObj, 0, 0, Size, Color, true);
return;
}
}
}
}
}
} else {
Circle(drawOnObj, 0, 0, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 0, 0, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, -10, Size, Color, true);
Circle(drawOnObj, -10, 10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
return;
Circle(drawOnObj, -10, -10, Size, Color, true);
Circle(drawOnObj, 10, -10, Size, Color, true);
Circle(drawOnObj, -10, 10, Size, Color, true);
Circle(drawOnObj, 10, 10, Size, Color, true);
Circle(drawOnObj, 0, 0, Size, Color, true);
return;
Circle(drawOnObj, -12, 10, Size, Color, true);
Circle(drawOnObj, 0, 10, Size, Color, true);
Circle(drawOnObj, 12, 10, Size, Color, true);
Circle(drawOnObj, -12, -10, Size, Color, true);
Circle(drawOnObj, 0, -10, Size, Color, true);
Circle(drawOnObj, 12, -10, Size, Color, true);
}
}
}
// unexpected jump
// unexpected jump
function Circle(drawOnObj, X, Y, Size, Col, FillQ) {
tellTarget (getProperty("..", _target)) {
tellTarget (drawOnObj) {
if (FillQ) {
beginFill(Col, 100);
}
lineStyle(1, Col, 100);
var DegStep = (90 / Size);
var deg = 0;
for ( ; deg < 360 ; deg = deg + DegStep) {
ThisX = X + (Math.sin(deg * (Math.PI/180)) * Size);
ThisY = Y + (Math.cos(deg * (Math.PI/180)) * Size);
if (deg == 0) {
moveTo(ThisX, ThisY);
EndX = ThisX;
EndY = ThisY;
} else {
lineTo(ThisX, ThisY);
}
}
lineTo(EndX, EndY);
if (FillQ) {
endFill();
}
};
}
}
// unexpected jump
// unexpected jump
drawDots(5, 8947848, 1, true);
// unexpected jump
// unexpected jump
};
nextFrame();
play();
Symbol 38 MovieClip Frame 3
tellTarget ("..") {
if (TimeLeft > 0) {
this._parent._rotation = ((random(100000) / 100000) - 0.5) * 90;
RandMove = random(100000) / 100000;
Scale = 100 - (RandMove * 50);
Move = RandMove * 20;
if ((random(100000) / 100000) > 0.5) {
Move = -Move;
}
if ((random(100000) / 100000) > 0.5) {
Face._xscale = Scale;
Face._yscale = 100;
Face._x = x0 - Move;
Face._y = y0;
} else {
Face._xscale = 100;
Face._yscale = Scale;
Face._x = x0;
Face._y = y0 - Move;
}
Dots = Math.randomint(6) + 1;
nudgex = 0;
nudgey = 0;
drawDots(5, 10066329, Dots, true);
TimeLeft--;
} else if (rollingQ == true) {
rollingQ = false;
Face._xscale = 100;
Face._yscale = 100;
Face._x = x0;
Face._y = y0;
drawDots(5, 0, Value, true);
_root.sttTimer = getTimer();
}
};
gotoAndPlay (2);
Symbol 45 Button
on (rollOver) {
tellTarget ("..") {
if (!_root.Snd.OnQ) {
stopAllSounds();
}
this._parent._alpha = 30;
}
}
on (release) {
tellTarget ("..") {
_parent.answered(this._parent._name);
}
}
on (rollOut) {
tellTarget ("..") {
this._parent._alpha = 100;
}
}
Symbol 57 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function Incr() {
tellTarget (getProperty("..", _target)) {
TheText.text = ((TheText.text + 0)+1);
}
}
}
} else {
// unexpected jump
}
function setMe(setVal) {
tellTarget (getProperty("..", _target)) {
TheText.text = setVal;
}
}
// unexpected jump
// unexpected jump
};
stop();
Symbol 59 Button
on (rollOver) {
tellTarget ("..") {
if (!_root.Snd.OnQ) {
stopAllSounds();
}
this._parent._alpha = 30;
}
}
on (release) {
tellTarget ("..") {
_parent.ChooseAnswer(this._parent._name);
}
}
on (rollOut) {
tellTarget ("..") {
this._parent._alpha = 100;
}
}
Symbol 66 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function Incr() {
tellTarget (getProperty("..", _target)) {
TheText.text = ((TheText.text + 0)+1);
}
}
}
} else {
// unexpected jump
}
function setMe(setVal) {
tellTarget (getProperty("..", _target)) {
TheText.text = setVal;
}
}
// unexpected jump
// unexpected jump
function getMe(setVal) {
tellTarget (getProperty("..", _target)) {
return(TheText.text);
}
}
// unexpected jump
// unexpected jump
};
stop();
Symbol 96 MovieClip Frame 1
_text.onChanged = function () {
_root.answered(this.text);
};
stop();
Symbol 103 Button
on (release) {
_root.restart();
}
Symbol 106 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function roll() {
tellTarget (getProperty("..", _target)) {
var A = 0;
_root.getGameType();
if (_root.getGameType() != "Test") {
if (_root.getGameType() != "AddSingle") {
if (_root.getGameType() != "AddDouble") {
if (_root.getGameType() != "SubtractSingle") {
if (_root.getGameType() != "SubtractDouble") {
if (_root.getGameType() != "Multiply5x5") {
if (_root.getGameType() != "Multiply10x10") {
if (_root.getGameType() != "Multiply12x12") {
// unexpected jump
while (!((A >= 1) ? (A <= 9) : false)) {
t1 = Math.randomint(2) + 1;
t2 = Math.randomint(2) + 1;
A = t1 + t2;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 1) ? ((A <= 9) ? (t2 >= 1) : false) : false)) {
t1 = random(9) + 1;
A = random(11 - t1) + 1;
t2 = A - t1;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 10) ? ((A <= 99) ? (t2 >= 1) : false) : false)) {
t1 = random(99) + 1;
A = random(100 - t1) + 1;
t2 = A - t1;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 1) ? (A <= 9) : false)) {
t1 = random(19) + 1;
t2 = random(19) + 1;
A = t1 - t2;
}
Q = (t1 + " - ") + t2;
// unexpected jump
while (!((A >= 10) ? ((A <= 99) ? (t2 >= 1) : false) : false)) {
t1 = random(199) + 1;
A = random(100) + 1;
t2 = t1 - A;
}
Q = (t1 + " - ") + t2;
// unexpected jump
while (!((A >= 2) ? (A <= 99) : false)) {
t1 = random(4) + 2;
t2 = random(4) + 2;
A = t1 * t2;
}
Q = (t1 + " x ") + t2;
// unexpected jump
while (!((A >= 10) ? (A <= 99) : false)) {
t1 = random(9) + 2;
t2 = random(9) + 2;
A = t1 * t2;
}
Q = (t1 + " x ") + t2;
// unexpected jump
}
}
}
}
}
}
}
} else {
while (!((A >= 1) ? (A <= 9) : false)) {
t1 = Math.randomint(2) + 1;
t2 = Math.randomint(2) + 1;
A = t1 + t2;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 1) ? (((A <= 9) ? (t2 >= 1) : false)) : false)) {
t1 = random(9) + 1;
A = random(11 - t1) + 1;
t2 = A - t1;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 10) ? (((A <= 99) ? (t2 >= 1) : false)) : false)) {
t1 = random(99) + 1;
A = random(100 - t1) + 1;
t2 = A - t1;
}
Q = (t1 + " + ") + t2;
// unexpected jump
while (!((A >= 1) ? (A <= 9) : false)) {
t1 = random(19) + 1;
t2 = random(19) + 1;
A = t1 - t2;
}
Q = (t1 + " - ") + t2;
// unexpected jump
while (!((A >= 10) ? (((A <= 99) ? (t2 >= 1) : false)) : false)) {
t1 = random(199) + 1;
A = random(100) + 1;
t2 = t1 - A;
}
Q = (t1 + " - ") + t2;
// unexpected jump
while (!((A >= 2) ? (A <= 99) : false)) {
t1 = random(4) + 2;
t2 = random(4) + 2;
A = t1 * t2;
}
Q = (t1 + " x ") + t2;
// unexpected jump
while (!((A >= 10) ? (A <= 99) : false)) {
t1 = random(9) + 2;
t2 = random(9) + 2;
A = t1 * t2;
}
Q = (t1 + " x ") + t2;
// unexpected jump
while (A < 10) {
t1 = random(11) + 2;
t2 = random(11) + 2;
A = t1 * t2;
}
Q = (t1 + " x ") + t2;
}
Q = Q + " =";
Selection.setFocus("_root.AText.text");
Selection.setSelection(0, 2);
if (!((0 < A) ? (Q != _root.QText.text) : false)) {
roll();
} else {
_root.sttTimer = getTimer();
_root.answer = A;
_root.AText.text = "";
_root.QText.text = Q;
}
}
}
}
} else {
// unexpected jump
}
};
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 4
stop();
roll();
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 5
_root.QBG._alpha = 50;
Symbol 111 MovieClip Frame 7
_root.QBG._alpha = 100;
Symbol 111 MovieClip Frame 20
_root.QBG._alpha = 50;
Symbol 111 MovieClip Frame 22
_root.QBG._alpha = 100;
Symbol 111 MovieClip Frame 35
_root.QBG._alpha = 50;
Symbol 111 MovieClip Frame 37
_root.QBG._alpha = 100;
_root.QText.text = "? ? ? =";
_root.AText.text = "?";
Symbol 111 MovieClip Frame 50
_root.roll();
Symbol 120 Button
on (release) {
tellTarget ("..") {
_root.debug = "test";
_root.HighScores.addMe(NewScore);
var outgoing_lc = new LocalConnection();
outgoing_lc.send("mathopolis", "methodToExecute", s);
}
}
Symbol 126 Button
on (press) {
tellTarget ("..") {
_root.PlayBtn.fade(-10);
_root.restart();
}
}
Symbol 128 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function Clear() {
tellTarget (getProperty("..", _target)) {
MsgSprite.MsgText.text = "";
Score = 0;
}
}
}
} else {
// unexpected jump
}
function addMe(s, NewHiTryQ) {
tellTarget (getProperty("..", _target)) {
MsgSprite.MsgText.text = MsgSprite.MsgText.text + s;
HiTryQ = NewHiTryQ;
MsgSprite.AddBtn._visible = HiTryQ;
}
}
// unexpected jump
// unexpected jump
function ShowMe() {
tellTarget (getProperty("..", _target)) {
if (!(IsOpen ? (Velocity != -1) : false)) {
Velocity = 1;
gotoAndPlay(2);
}
}
}
// unexpected jump
// unexpected jump
function hideMe() {
tellTarget (getProperty("..", _target)) {
if (!((!IsOpen) ? (Velocity != 1) : false)) {
Velocity = -1;
gotoAndPlay(15);
}
}
}
// unexpected jump
// unexpected jump
IsOpen = false;
Velocity = 0;
Score = 0;
stop();
// unexpected jump
// unexpected jump
};
stop();
Symbol 134 Button
on (release) {
_parent.hideMe();
}
Symbol 135 MovieClip Frame 14
IsOpen = true;
Velocity = 0;
stop();
Symbol 135 MovieClip Frame 25
stop();
IsOpen = false;
Velocity = 0;
stop();
Symbol 136 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
function setStt() {
tellTarget (getProperty("..", _target)) {
sttTime = new Date();
}
}
}
} else {
// unexpected jump
}
function addMe(newScore) {
tellTarget (getProperty("..", _target)) {
score = fmt2(newScore);
var endTime = new Date();
var elapsed = (endTime - sttTime);
totalCount = _root.totAnswers;
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (totalCount == undefined) {
totalCount = 0;
}
rightCount = _root.RightCount.getMe();
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (rightCount == undefined) {
rightCount = 0;
}
gameName = _root.g;
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (gameName == undefined) {
gameName = "?";
}
gameMode = _root.m;
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (gameMode == undefined) {
gameMode = "?";
}
var s = makeScoreStr(sttTime, elapsed, gameName, gameMode, score, totalCount, rightCount);
var outgoing_lc = new LocalConnection();
outgoing_lc.send("mathopolis", "methodToExecute", s);
}
}
// unexpected jump
// unexpected jump
function makeScoreStr(sttTime, totElapsed, gameName, gameMode, score, totalCount, rightCount) {
tellTarget (getProperty("..", _target)) {
var v = "00";
var sep = "~";
var s = "";
s = s + fmtTime(sttTime);
s = s + sep;
s = s + int(sttTime.getTimezoneOffset() / 60);
s = s + sep;
s = s + (totElapsed / 1000);
s = s + sep;
s = s + gameName;
s = s + sep;
s = s + gameMode;
s = s + sep;
s = s + (score add "");
s = s + sep;
s = s + totalCount;
s = s + sep;
s = s + rightCount;
s = s + sep;
s = s + keyMake(gameMode, score add "");
s = encodeBase64(s);
s = v + s;
return(s);
}
}
// unexpected jump
// unexpected jump
function keyMake(a, b) {
tellTarget (getProperty("..", _target)) {
both = a + b;
c = both.substr(0, 4);
var i = 1;
for ( ; int(both.length / 4) >= i ; i++) {
c = rotStr(c, both.substr(i * 4, 4));
}
c = keyShuffle(c, b);
c = rotStr(c, b);
return(c);
}
}
// unexpected jump
// unexpected jump
function keyXor(to_enc, xor_key) {
tellTarget (getProperty("..", _target)) {
var the_res = "";
i = 0;
for ( ; i < to_enc.length ; i++) {
the_res = the_res + chr(xor_key ^ to_enc.charCodeAt(i));
}
return(the_res);
}
}
// unexpected jump
// unexpected jump
function rotStr(to_enc, rot_key) {
tellTarget (getProperty("..", _target)) {
the_res = "";
i = 0;
for ( ; i < 4 ; i++) {
the_res = the_res + rotChr(to_enc.substr(i, 1), rot_key.substr(i, 1));
}
return(the_res);
}
}
// unexpected jump
// unexpected jump
function rotChr(chr1, chr2) {
tellTarget (getProperty("..", _target)) {
ord1 = ordOffset(chr1);
ord2 = ordOffset(chr2);
rotnum = ord1 + ord2;
if (rotnum >= 26) {
rotnum = rotnum - 26;
}
return(chr(rotnum + 97));
}
}
// unexpected jump
// unexpected jump
function ordOffset(chr1) {
tellTarget (getProperty("..", _target)) {
if (chr1.length == 0) {
return(0);
}
var ord1 = ord(chr1.toLowerCase());
if (!((ord1 >= 48) ? (57 < ord1) : true)) {
ord1 = ord1 - 48;
}
if (!((ord1 >= 97) ? (122 < ord1) : true)) {
ord1 = ord1 - 97;
}
if (ord1 > 26) {
ord1 = 0;
}
return(ord1);
}
}
// unexpected jump
// unexpected jump
function keyShuffle(a, b) {
tellTarget (getProperty("..", _target)) {
alen = a.length;
var aArr = new Array();
var i = 0;
for ( ; i < 4 ; i++) {
aArr[i] = a.substr(i, 1);
}
blen = b.length;
var i = 0;
for ( ; i < 4 ; i++) {
places = ordOffset(b.substr(i, 1));
newpos = (i + places) % 4;
if (newpos != i) {
var temp = aArr[i];
aArr[i] = aArr[newpos];
aArr[newpos] = temp;
}
}
c = "";
var i = 0;
for ( ; i < 4 ; i++) {
c = c + aArr[i];
}
return(c);
}
}
// unexpected jump
// unexpected jump
function cleanURL(s) {
tellTarget (getProperty("..", _target)) {
s = s.replace(" ", "%20");
return(s);
}
}
// unexpected jump
// unexpected jump
function encodeBase64(input) {
tellTarget (getProperty("..", _target)) {
var output = "";
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_:";
var i = 0;
while (i < input.length) {
var chr1 = input.charCodeAt(i++);
var chr2 = input.charCodeAt(i++);
var chr3 = input.charCodeAt(i++);
var enc1 = (chr1 >> 2);
var enc2 = (((chr1 & 3) << 4) | (chr2 >> 4));
var enc3 = (((chr2 & 15) << 2) | (chr3 >> 6));
var enc4 = (chr3 & 63);
if (isNaN(chr2)) {
enc4 = 64;
enc3 = enc4;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = (((output + keyStr.charAt(enc1)) + keyStr.charAt(enc2)) + keyStr.charAt(enc3)) + keyStr.charAt(enc4);
}
return(output);
}
}
// unexpected jump
// unexpected jump
function fmtTime(t) {
tellTarget (getProperty("..", _target)) {
var s = "";
s = s + t.getFullYear().toString().substr(2, 2);
s = s + pad0(t.getMonth() + 1);
s = s + pad0(t.getDate());
s = s + pad0(t.getHours());
s = s + pad0(t.getMinutes());
s = s + pad0(t.getSeconds());
return(s);
}
}
// unexpected jump
// unexpected jump
function pad0(n) {
tellTarget (getProperty("..", _target)) {
if (n < 10) {
return("0" + n);
}
return(n);
}
}
// unexpected jump
// unexpected jump
function fmt2(x) {
tellTarget (getProperty("..", _target)) {
x2 = Math.round(x * 100) / 100;
return(x2);
}
}
// unexpected jump
// unexpected jump
var sttTime = new Date();
// unexpected jump
// unexpected jump
};
stop();