Instance of Symbol 32 MovieClip in Frame 1
onClipEvent (load) {
xin_motion_val = "Toward";
xin_alphatype_val = "No";
xout_motion_val = "None";
xout_alphatype_val = "No";
perc_req_val = 100;
show_perc_val = "Yes";
slow_factor_val = 0.2;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Instance of Symbol 37 MovieClip in Frame 1
onClipEvent (load) {
highscore_url = "http://";
game_id = 1;
score_variable = "score";
button_label = "Play Again";
}
Frame 3
stop();
Frame 4
function getDivideNumber() {
matchNumber = random(divMax) + 1;
if ((divMax - (divMax / 2)) < matchNumber) {
matchNumber = random(divMax) + 1;
}
startNumber = 100;
if (0 >= NumbersAvailable) {
endGameFunction();
} else if (NumbersAvailable >= 5) {
var numbersOnlyArray = new Array();
var i = 0;
while (i < numbersLeftArray.length) {
numbersOnlyArray.push(_root[numbersLeftArray[i]].number);
i++;
}
numbersOnlyArray.Randomize();
startNumber = matchNumber;
var howManyNumbers = Math.ceil(Math.random() * 3);
var i = 0;
while (i < howManyNumbers) {
startNumber = startNumber * numbersOnlyArray[i];
i++;
}
display.Numbertext = matchNumber;
totalUser = startNumber;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
} else if (NumbersAvailable < 5) {
if (checkIfPossible(matchNumber) == false) {
endGameFunction();
} else {
display.Numbertext = matchNumber;
totalUser = 1;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
}
}
_root.counter = (("Division : " + startNumber) + " / ? = ") + matchNumber;
updateDivideCounter();
}
function checkDivide(myNumber, myArray) {
trace(mynumber);
var myInNumber = myNumber;
var myInArray = new Array();
myInArray.copy(myArray);
var subTotal = divMax;
var newArray = new Array();
var i = 0;
while (i < myInArray.length) {
if (myInArray[i] == myInNumber) {
return(true);
}
if (myInArray[i] < myInNumber) {
newArray.push(myInArray[i]);
subTotal = subTotal / myInArray[i];
}
i++;
}
if (subTotal == myInNumber) {
return(true);
}
if (myInNumber < subTotal) {
return(false);
}
var i = 0;
while (i < newArray.length) {
var newNum = (myInNumber - newArray[i]);
var newerArray = new Array();
newerArray = newArray.slice(i + 1);
what = checkDivide(newNum, newerArray);
if (what == true) {
return(true);
}
i++;
}
return(false);
}
function DivideMyNumber(myNumber, myName) {
var status = "none";
totalUser = totalUser / myNumber;
totalUser = roundOff2(totalUser);
if (totalUser == matchNumber) {
correctSoundObj.start();
thisScore = 0;
numberArray.push(myNumber);
numberSelectedArray.push(myName);
letterScore = numberSelectedArray.length * 5;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("score");
_root[numberSelectedArray[i]].score = letterScore;
thisScore = thisScore + letterScore;
NumbersAvailable--;
var tempNum = numbersLeftArray.find(numberSelectedArray[i]);
numbersLeftArray.removeOne(tempNum);
i++;
}
runningScore = runningScore + thisScore;
_root.score = runningScore + bonusScore;
display.numberScoretext = _root.score;
status = "finish";
_root.gameMode = "wait";
} else if (totalUser < matchNumber) {
wrongSoundObj.start();
thisScore = 0;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("off");
i++;
}
_root[myName].gotoAndStop("off");
totalUser = startNumber;
numberSelectedArray = new Array();
numberArray = new Array();
status = "reset";
} else {
numberSelectedArray.push(myName);
numberArray.push(myNumber);
status = "taken";
}
updateDivideCounter();
return(status);
}
function updateDivideCounter() {
if (0 < numberArray.length) {
_root.counterTracker = startNumber + " / ";
var i = 0;
while (i < (numberArray.length - 1)) {
_root.counterTracker = (_root.counterTracker + numberArray[i]) + " / ";
i++;
}
_root.counterTracker = ((_root.counterTracker + numberArray[i]) + " = ") + totalUser;
} else {
_root.counterTracker = " ";
}
}
function roundOff2(myNumber) {
myNumber = Math.floor(myNumber * 100);
return(myNumber / 100);
}
function getMultiplyNumber() {
var multNumberArray = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 24, 27, 30, 32, 36, 40, 42);
startNumber = 1;
if (0 >= NumbersAvailable) {
endGameFunction();
} else if (NumbersAvailable >= 5) {
var numbersOnlyArray = new Array();
var i = 0;
while (i < numbersLeftArray.length) {
numbersOnlyArray.push(_root[numbersLeftArray[i]].number);
i++;
}
numbersOnlyArray.Randomize();
matchNumber = 1;
var howManyNumbers = Math.ceil(Math.random() * multMax);
var i = 0;
while (i < howManyNumbers) {
matchNumber = matchNumber * numbersOnlyArray[i];
i++;
}
display.Numbertext = matchNumber;
totalUser = 1;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
} else if (NumbersAvailable < 5) {
matchNumber = Math.ceil(Math.random() * 20);
matchNumber = multNumberArray[matchNumber];
if (checkIfPossible(matchNumber) == false) {
endGameFunction();
} else {
display.Numbertext = matchNumber;
totalUser = 1;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
}
}
_root.counter = "Multiplication : ? * ? = " + matchNumber;
updateMultCounter();
}
function checkMultiply(myNumber, myArray) {
var myInNumber = myNumber;
var myInArray = new Array();
myInArray.copy(myArray);
var subTotal = 1;
var newArray = new Array();
var i = 0;
while (i < myInArray.length) {
if (myInArray[i] == myInNumber) {
return(true);
}
if (myInArray[i] < myInNumber) {
newArray.push(myInArray[i]);
subTotal = subTotal * myInArray[i];
}
i++;
}
if (subTotal == myInNumber) {
return(true);
}
if (subTotal < myInNumber) {
return(false);
}
var i = 0;
while (i < newArray.length) {
var newNum = (myInNumber - newArray[i]);
var newerArray = new Array();
newerArray = newArray.slice(i + 1);
what = checkMultiply(newNum, newerArray);
if (what == true) {
return(true);
}
i++;
}
return(false);
}
function multiplyMyNumber(myNumber, myName) {
var status = "none";
totalUser = totalUser * myNumber;
if (totalUser == matchNumber) {
correctSoundObj.start();
thisScore = 0;
numberArray.push(myNumber);
numberSelectedArray.push(myName);
letterScore = numberSelectedArray.length * 5;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("score");
_root[numberSelectedArray[i]].score = letterScore;
thisScore = thisScore + letterScore;
NumbersAvailable--;
var tempNum = numbersLeftArray.find(numberSelectedArray[i]);
numbersLeftArray.removeOne(tempNum);
i++;
}
runningScore = runningScore + thisScore;
_root.score = runningScore + bonusScore;
display.numberScoretext = _root.score;
status = "finish";
_root.gameMode = "wait";
} else if (matchNumber < totalUser) {
wrongSoundObj.start();
thisScore = 1;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("off");
i++;
}
_root[myName].gotoAndStop("off");
totalUser = startNumber;
numberSelectedArray = new Array();
numberArray = new Array();
status = "reset";
} else {
trace("in corect place");
numberSelectedArray.push(myName);
numberArray.push(myNumber);
status = "taken";
}
updateMultCounter();
return(status);
}
function updateMultCounter() {
if (0 < numberArray.length) {
_root.counterTracker = " ";
var i = 0;
while (i < (numberArray.length - 1)) {
_root.counterTracker = (_root.counterTracker + numberArray[i]) + " * ";
i++;
}
_root.counterTracker = ((_root.counterTracker + numberArray[i]) + " = ") + totalUser;
} else {
_root.counterTracker = " ";
}
}
function getSubtractNumber() {
startNumber = subMax;
if (0 >= NumbersAvailable) {
endGameFunction();
}
matchNumber = random(subMax) + 1;
if ((subMax - (subMax / 4)) < matchNumber) {
matchNumber = random(subMax) + 1;
}
display.Numbertext = matchNumber;
totalUser = subMax;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
if (NumbersAvailable < subMax) {
if (checkIfPossible(matchNumber) == false) {
endGameFunction();
}
}
_root.counter = (("Subtraction : " + startNumber) + " - ? = ") + matchNumber;
updateSubtractCounter();
}
function checkSubtraction(myNumber, myArray) {
var myInNumber = myNumber;
var myInArray = new Array();
myInArray.copy(myArray);
var subTotal = subMax;
var newArray = new Array();
var i = 0;
while (i < myInArray.length) {
if (myInArray[i] == myInNumber) {
return(true);
}
if (myInArray[i] < myInNumber) {
newArray.push(myInArray[i]);
subTotal = subTotal - myInArray[i];
}
i++;
}
if (subTotal == myInNumber) {
return(true);
}
if (myInNumber < subTotal) {
return(false);
}
var i = 0;
while (i < newArray.length) {
var newNum = (myInNumber - newArray[i]);
var newerArray = new Array();
newerArray = newArray.slice(i + 1);
what = checkSubtraction(newNum, newerArray);
if (what == true) {
return(true);
}
i++;
}
return(false);
}
function SubtractMyNumber(myNumber, myName) {
var status = "none";
totalUser = totalUser - myNumber;
if (totalUser == matchNumber) {
correctSoundObj.start();
thisScore = 0;
numberArray.push(myNumber);
numberSelectedArray.push(myName);
letterScore = numberSelectedArray.length * 5;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("score");
_root[numberSelectedArray[i]].score = letterScore;
thisScore = thisScore + letterScore;
NumbersAvailable--;
var tempNum = numbersLeftArray.find(numberSelectedArray[i]);
numbersLeftArray.removeOne(tempNum);
i++;
}
runningScore = runningScore + thisScore;
_root.score = runningScore + bonusScore;
display.numberScoretext = _root.score;
status = "finish";
_root.gameMode = "wait";
} else if (totalUser < matchNumber) {
wrongSoundObj.start();
thisScore = 0;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("off");
i++;
}
_root[myName].gotoAndStop("off");
totalUser = startNumber;
numberSelectedArray = new Array();
numberArray = new Array();
status = "reset";
} else {
numberSelectedArray.push(myName);
numberArray.push(myNumber);
status = "taken";
}
updateSubtractCounter();
return(status);
}
function updateSubtractCounter() {
if (0 < numberArray.length) {
_root.counterTracker = subMax + " - ";
var i = 0;
while (i < (numberArray.length - 1)) {
_root.counterTracker = (_root.counterTracker + numberArray[i]) + " - ";
i++;
}
_root.counterTracker = ((_root.counterTracker + numberArray[i]) + " = ") + totalUser;
} else {
_root.counterTracker = " ";
}
}
function getAddNumber() {
startNumber = 0;
if (0 >= NumbersAvailable) {
endGameFunction();
}
trace(addMax);
matchNumber = random(addMax) + 1;
if (matchNumber < 4) {
matchNumber = random(addMax) + 1;
}
display.numbertext = matchNumber;
totalUser = 0;
numberSelectedArray = new Array();
numberArray = new Array();
display.bonusMC.startTimer();
if (NumbersAvailable < addMax) {
if (checkIfPossible(matchNumber) == false) {
endGameFunction();
}
}
_root.counter = "Addition : ? + ? = " + matchNumber;
updateAddCounter();
}
function checkAddition(myNumber, myArray) {
var myInNumber = myNumber;
var myInArray = new Array();
myInArray.copy(myArray);
var addTotal = 0;
var newArray = new Array();
var i = 0;
while (i < myInArray.length) {
if (myInArray[i] == myInNumber) {
return(true);
}
if (myInArray[i] < myInNumber) {
newArray.push(myInArray[i]);
addTotal = addTotal + myInArray[i];
}
i++;
}
if (addTotal == myInNumber) {
return(true);
}
if (addTotal < myInNumber) {
return(false);
}
var i = 0;
while (i < newArray.length) {
var newNum = (myInNumber - newArray[i]);
var newerArray = new Array();
newerArray = newArray.slice(i + 1);
what = checkAddition(newNum, newerArray);
if (what == true) {
return(true);
}
i++;
}
return(false);
}
function AddMyNumber(myNumber, myName) {
var status = "none";
totalUser = totalUser + myNumber;
if (totalUser == matchNumber) {
correctSoundObj.start();
thisScore = 0;
numberArray.push(myNumber);
numberSelectedArray.push(myName);
letterScore = numberSelectedArray.length * 5;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("score");
_root[numberSelectedArray[i]].score = letterScore;
thisScore = thisScore + letterScore;
NumbersAvailable--;
var tempNum = numbersLeftArray.find(numberSelectedArray[i]);
numbersLeftArray.removeOne(tempNum);
i++;
}
runningScore = runningScore + thisScore;
_root.score = runningScore + bonusScore;
display.numberScoretext = _root.score;
status = "finish";
_root.gameMode = "wait";
} else if (matchNumber < totalUser) {
wrongSoundObj.start();
thisScore = 0;
var i = 0;
while (i < numberSelectedArray.length) {
_root[numberSelectedArray[i]].gotoAndPlay("off");
i++;
}
_root[myName].gotoAndStop("off");
totalUser = startNumber;
numberSelectedArray = new Array();
numberArray = new Array();
status = "reset";
} else {
numberSelectedArray.push(myName);
numberArray.push(myNumber);
status = "taken";
}
updateAddCounter();
return(status);
}
function updateAddCounter() {
if (0 < numberArray.length) {
_root.counterTracker = " ";
var i = 0;
while (i < (numberArray.length - 1)) {
_root.counterTracker = (_root.counterTracker + numberArray[i]) + " + ";
i++;
}
_root.counterTracker = ((_root.counterTracker + numberArray[i]) + " = ") + totalUser;
} else {
_root.counterTracker = " ";
}
}
function _copy(a) {
var j = 0;
while (j < a.length) {
this[j] = a[j];
j++;
}
}
function _find_in_Array(value) {
var z = 0;
while (z < this.length) {
if (this[z] == value) {
return(z);
}
z++;
}
return(-1);
}
function _Remove_element(whichOne) {
var newArray = new Array(this.length - 1);
var j = 0;
var i = 0;
while (i < this.length) {
if (i != whichOne) {
newArray[j] = this[i];
j++;
}
i++;
}
this.pop();
this.copy(newArray);
}
Array.prototype.Randomize = function () {
var newArray = new Array(this.length);
newArray.copy(this);
var i = 0;
while (i < this.length) {
var myNumber = random(newArray.length);
this[i] = newArray[myNumber];
newArray.splice(myNumber, 1);
i++;
}
};
Array.prototype.copy = _copy;
Array.prototype.Find = _find_in_Array;
Array.prototype.RemoveOne = _Remove_element;
function placeNumbers() {
NumbersAvailable = 0;
var Level = 10;
var xPos = _root.XPosition;
var ystart = _root.YPosition;
numbersLeftArray = new Array();
var i = 0;
while (i < _root.numberOfColumns) {
yPos = yStart;
var j = 0;
while (j < _root.numberOfRows) {
attachMovie("number", "number" + level, level);
_root["number" + level]._x = xPos;
_root["number" + level]._y = yPos;
_root["number" + level]._width = boxWidth;
_root["number" + level]._height = boxHeight;
_root["number" + level].number = random(9) + 1;
yPos = yPos + (boxHeight + padding);
numbersLeftArray.push("number" + level);
level++;
NumbersAvailable++;
j++;
}
xPos = xPos + (boxWidth + padding);
i++;
}
}
function checkIfPossible(checkNumber) {
var numbersOnlyArray = new Array();
var i = 0;
while (i < numbersLeftArray.length) {
numbersOnlyArray.push(_root[numbersLeftArray[i]].number);
i++;
}
if (mathType == "Add") {
return(checkAddition(checkNumber, numbersOnlyArray));
}
if (mathType == "Subtract") {
return(checkSubtraction(checkNumber, numbersOnlyArray));
}
if (mathType == "Multiply") {
return(checkMultiply(checkNumber, numbersOnlyArray));
}
return(checkDivide(checkNumber, numbersOnlyArray));
}
function removeMyNumber(mynumber, myName) {
var i = 0;
while (i < numberSelectedArray.length) {
if (numberSelectedArray[i] == myName) {
numberSelectedArray.RemoveOne(i);
}
i++;
}
var i = 0;
while (i < numberArray.length) {
if (numberArray[i] == mynumber) {
numberArray.RemoveOne(i);
}
i++;
}
if (mathType == "Add") {
totalUser = totalUser - myNumber;
updateAddCounter();
} else if (mathType == "Subtract") {
totalUser = totalUser + myNumber;
updateSubtractCounter();
} else if (mathType == "Multiply") {
totalUser = totalUser / myNumber;
updateMultCounter();
} else {
totalUser = totalUser * myNumber;
if ((startNumber - totalUser) < 1) {
totalUser = startNumber;
}
updateDivideCounter();
}
}
function endGameFunction() {
var Level = 10;
var i = 0;
while (i < _root.numberOfColumns) {
var j = 0;
while (j < _root.numberOfRows) {
_root["number" + level].gotoAndPlay("final");
level++;
j++;
}
i++;
}
gameMode = "finish";
}
function fixTrueFalse(stringValue) {
if (stringValue == "true") {
return(true);
}
if (stringValue == "false") {
return(false);
}
}
function DoMyNumber(myNumber, myName) {
if (mathType == "Add") {
return(AddMyNumber(myNumber, myName));
}
if (mathType == "Subtract") {
trace("sub");
return(SubtractMyNumber(myNumber, myName));
}
if (mathType == "Multiply") {
return(multiplyMyNumber(myNumber, myName));
}
return(DivideMyNumber(myNumber, myName));
}
function getNumber() {
if (mathType == "Add") {
getAddNumber();
} else if (mathType == "Subtract") {
getSubtractNumber();
} else if (mathType == "Multiply") {
getMultiplyNumber();
} else if (mathType == "Divide") {
getDivideNumber();
} else {
mathType = "Add";
getAddNumber();
}
}
Math.trans = 0.0174532925199433 /* Math.PI/180 */;
currentscore = 0;
score = currentscore;
checkTime = getTimer() + delay;
Instance of Symbol 66 MovieClip in Frame 4
onClipEvent (load) {
game_time_val = 200;
math_type_val = "Multiply";
number_rows_val = 10;
number_columns_val = 10;
placement_x_val = 70;
placement_y_val = 50;
box_width_val = 30;
box_height_val = 30;
padding_val = 0;
correct_sound_val = "correct";
wrong_sound_val = "wrong";
add_max_val = 40;
sub_max_val = 50;
mult_max_val = 2;
div_max_val = 30;
show_matched_val = "false";
button_animation_val = "false";
object_base_name_val = "Object";
button_base_name_val = "Button";
object_sound_base_name_val = "ObjectSound";
available_pieces_val = 20;
file_name_val = "Quiz.txt";
question_time_val = 0;
questions_per_quiz_val = 10;
waiting_sound_val = "timesound";
expired_sound_val = "timeup";
one_chance_val = "true";
show_correct_val = "true";
correct_time_val = 5;
show_totalQuiz_val = "false";
answers_per_question_val = 3;
TextField15 = "XCH";
readTextFile = "true";
TextFileName = "quiz.txt";
gameTime = 0;
questionTime = 0;
QuestionsperQuiz = 15;
numberOfAnswers = 3;
correctSound = "correct";
wrongSound = "wrong";
timeSound = "timeSound";
timeEndSound = "timeUp";
numberOfQuestions = 5;
question1 = "Which area of the brain is responsible for solving problems and planning for the future?";
answer1_1 = "frontal lobe ";
answer1_2 = "sensory cortex";
answer1_3 = "amygdala";
question2 = "Which area of the brain helps us understand the meaning of words, for example while in a conversation?";
answer2_1 = "wernicke's area ";
answer2_2 = "hippocampus";
answer2_3 = "frontal lobe";
question3 = "Which area of the brain is responsible for moving arms and legs, and other muscles?";
answer3_1 = "motor cortex ";
answer3_2 = "broca's area";
answer3_3 = "prefrontal cortex";
question4 = "Which area of the brain are very intense emotions such as fear and anger located?";
answer4_1 = "amygdala";
answer4_2 = "sensory cortex";
answer4_3 = "hippocampus";
question5 = "Which two main areas of the brain are involved in language skills?";
answer5_1 = "the Wernicke's and Broca's area ";
answer5_2 = "the Hippocampus and Amygdala";
answer5_3 = "the Sensory and Motor Cortex";
}
Frame 9
currentscore = 0;
score = currentscore;
gameMode = "play";
placeNumbers();
getNumber();
Instance of Symbol 78 MovieClip "display" in Frame 9
onClipEvent (enterFrame) {
if (_root.score != this.numberScoretext) {
numberScoretext = _root.score;
}
}
Instance of Symbol 80 MovieClip "delayer" in Frame 9
onClipEvent (load) {
startTime = 0;
delayTime = 2;
}
onClipEvent (enterFrame) {
if (_root.gameMode == "getNumber") {
if (startTime == 0) {
startTime = getTimer();
} else {
timeLeft = int(delayTime - ((getTimer() - startTime) / 1000));
if (0 >= timeLeft) {
_root.gameMode = "play";
startTime = 0;
_root.getNumber();
}
}
}
if (_root.gameMode == "finish") {
if (startTime == 0) {
startTime = getTimer();
} else {
timeLeft = int(delayTime - ((getTimer() - startTime) / 1000));
if (0 >= timeLeft) {
_root.play();
}
}
}
}
Instance of Symbol 84 MovieClip "timer" in Frame 9
onClipEvent (load) {
if (0 < _root.gameTime) {
_visible = true;
startTime = getTimer();
useTimer = true;
} else {
_visible = false;
useTimer = false;
}
}
onClipEvent (enterFrame) {
if ((_root.gameMode == "play") && (useTimer == true)) {
timeLeft = int(_root.gameTime - ((getTimer() - startTime) / 1000));
if (0 >= timeLeft) {
_root.endGameFunction();
}
}
}
Frame 14
stop();
Frame 19
stop();
Frame 20
timer.startTime = getTimer();
gotoAndStop ("setup");
Symbol 6 Button
on (release) {
var status = _root.DoMyNumber(number, _name);
if (status == "finish") {
gotoAndPlay ("score");
} else if (status == "taken") {
gotoAndStop ("on");
} else {
gotoAndStop ("off");
}
}
Symbol 12 Button
on (release) {
_root.removeMyNumber(number, _name);
gotoAndStop ("off");
}
Symbol 15 MovieClip [number] Frame 1
stop();
Symbol 15 MovieClip [number] Frame 5
stop();
Symbol 15 MovieClip [number] Frame 20
if (_root.gameMode == "wait") {
_root.gameMode = "getNumber";
}
this.removeMovieClip();
stop();
Symbol 15 MovieClip [number] Frame 21
_root.score = _root.score - 10;
Symbol 15 MovieClip [number] Frame 35
this.removeMovieClip();
stop();
Symbol 32 MovieClip Frame 1
stop();
Instance of Symbol 31 MovieClip "swfloader" in Symbol 32 MovieClip Frame 1
onClipEvent (load) {
function strip_spaces(str) {
var _str = new String("");
var j = 0;
while (j < str.length) {
if ((str.charAt(j) != " ") && (str.charAt(j) != ";")) {
_str = _str + str.charAt(j);
}
j++;
}
return(_str);
}
function simple_script(action, timeline) {
action = strip_spaces(action);
if ((0 < action.length) && ((action.indexOf(")") != -1) && (action.indexOf("(") != -1))) {
var sections = action.split(".");
var timeline_action = sections.pop();
var first_paren = timeline_action.indexOf("(");
var second_paren = timeline_action.indexOf(")");
var timeline_function = timeline_action.substr(0, first_paren);
var function_parameter = timeline_action.substr(first_paren + 1, second_paren - (first_paren + 1));
var timeline_reference = timeline;
var j = 0;
while (j < sections.length) {
timeline_reference = timeline_reference[sections[j]];
j++;
}
if (function_parameter.indexOf("\"") != -1) {
function_parameter = function_parameter.substr(1, function_parameter.length - 2);
}
timeline_reference[timeline_function](function_parameter);
}
}
function execute_action() {
unloaded = true;
_parent._visible = false;
simple_script(_parent.play_action_val, _parent);
}
_parent.anim.gotoAndStop(1);
simple_script(_parent.init_action_val, _parent);
var done = false;
var unloaded = false;
var orig_x = _parent._x;
var orig_y = _parent._y;
var dist_x = (_parent._x + ((_parent._width * 2) / 3));
var dist_y = (_parent._y + ((_parent._height * 2) / 3));
var orig_a = _parent._alpha;
var accel_jump = 0.75;
var slow_factor = _parent.slow_factor_val;
var speed_factor = (1 + (slow_factor / (1 - slow_factor)));
var ready = false;
var perc_fadeout = 0;
_parent.perc._x = _parent.anim._x - (_parent.perc._width / 2);
_parent.perc._y = _parent.anim._y - (_parent.perc._height / 2);
if (slow_factor < 1) {
switch (_parent.xin_motion_val) {
case "Up" :
_parent._y = orig_y + (dist_y * 2);
break;
case :
_parent._y = orig_y - (dist_y * 2);
break;
case :
_parent._x = orig_x + (dist_x * 2);
break;
case :
_parent._x = orig_x - (dist_x * 2);
break;
case :
_parent._xscale = (_parent._yscale = 1);
break;
case :
_parent._alpha = 0;
}
} else {
ready = true;
}
}
onClipEvent (enterFrame) {
if (unloaded) {
return(undefined);
}
if (!ready) {
switch (_parent.xin_motion_val) {
case "Toward" :
_parent._xscale = _parent._xscale + ((100 - _parent._xscale) * slow_factor);
_parent._yscale = _parent._xscale;
if (_parent.xin_alphatype_val == "Yes") {
_parent._alpha = Math.round((orig_a / 100) * Math.max(0, Math.min(_parent._xscale, 100)));
}
if (Math.abs(100 - _parent._xscale) < 0.5) {
_parent._xscale = (_parent._yscale = 100);
_parent._alpha = orig_a;
ready = true;
}
break;
default :
_parent._x = _parent._x + ((orig_x - _parent._x) * slow_factor);
_parent._y = _parent._y + ((orig_y - _parent._y) * slow_factor);
if (_parent.xin_alphatype_val == "Yes") {
if (_parent.xin_motion_val == "None") {
_parent._alpha = _parent._alpha + ((orig_a - _parent._alpha) * slow_factor);
} else if (Math.abs(orig_y - _parent._y) < Math.abs(orig_x - _parent._x)) {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x)) * 100);
} else {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y)) * 100);
}
}
if (!(((_parent.xin_motion_val == "None") && (1 >= Math.abs(_parent._alpha - orig_a))) || (((_parent.xin_motion_val != "None") && (Math.abs(_parent._y - orig_y) < 0.5)) && (Math.abs(_parent._x - orig_x) < 0.5)))) {
break;
}
_parent._x = orig_x;
_parent._y = orig_y;
_parent._alpha = orig_a;
ready = true;
}
} else if (!done) {
var rl = _root.getBytesLoaded();
var rt = (_root.getBytesTotal() * (_parent.perc_req_val / 100));
if ((10 < rl) && (10 < rt)) {
rl = Math.min(rl, rt);
var new_frame = (_parent.anim._currentframe + Math.ceil(((_parent.anim._totalframes * (rl / rt)) - _parent.anim._currentframe) / 4));
new_frame = Math.max(1, new_frame);
if (_parent.show_perc_val == "Yes") {
_parent.perc.text = Math.round(((new_frame - 1) / (_parent.anim._totalframes - 1)) * 100) + " %";
}
if (new_frame != _parent.anim._currentframe) {
_parent.anim.gotoAndStop(new_frame);
}
if ((_parent.anim._totalframes == _parent.anim._currentframe) && (rl >= rt)) {
done = true;
}
}
} else if (slow_factor < 1) {
switch (_parent.xout_motion_val) {
case "Down" :
if (orig_y >= _parent._y) {
_parent._y = orig_y + accel_jump;
}
_parent._y = orig_y + (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if ((orig_y + (dist_y * 2)) < _parent._y) {
execute_action();
}
break;
case :
if (_parent._y >= orig_y) {
_parent._y = orig_y - accel_jump;
}
_parent._y = orig_y - (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y < (orig_y - (dist_y * 2))) {
execute_action();
}
break;
case :
if (orig_x >= _parent._x) {
_parent._x = orig_x + accel_jump;
}
_parent._x = orig_x + (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if ((orig_x + (dist_x * 2)) < _parent._x) {
execute_action();
}
break;
case :
if (_parent._x >= orig_x) {
_parent._x = orig_x - accel_jump;
}
_parent._x = orig_x - (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x < (orig_x - (dist_x * 2))) {
execute_action();
}
break;
case :
if ((_parent._xscale >= 100) || (_parent._yscale >= 100)) {
_parent._xscale = (_parent._yscale = 100 - accel_jump);
}
_parent._xscale = (_parent._yscale = Math.max(0.5, 100 - ((100 - _parent._yscale) * speed_factor)));
perc_fadeout = 100 - Math.round(Math.max(0, Math.min(_parent._xscale, 100)));
if (_parent._xscale < 1) {
execute_action();
}
break;
default :
perc_fadeout = perc_fadeout + ((100 - perc_fadeout) * slow_factor);
if (1 < Math.abs(perc_fadeout - 100)) {
break;
}
execute_action();
}
if (!(_parent.xout_alphatype_val === "Yes")) {
} else {
_parent._alpha = (orig_a / 100) * (100 - perc_fadeout);
}
} else {
execute_action();
}
}
Instance of Symbol 36 MovieClip "script" in Symbol 37 MovieClip Frame 1
onClipEvent (load) {
_root.eyeland_hs_highscore_url = _parent.highscore_url;
_root.eyeland_hs_game_id = _parent.game_id;
_root.eyeland_hs_score_variable = _parent.score_variable;
_root.eyeland_hs_button_label = _parent.button_label;
}
Symbol 44 MovieClip Frame 1
_parent.stop();
Symbol 44 MovieClip Frame 65
stop();
_parent.play();
Symbol 57 Button
on (release) {
_root.play();
}
Instance of Symbol 65 MovieClip in Symbol 66 MovieClip Frame 1
onClipEvent (load) {
function execute_action() {
unloaded = true;
_parent._visible = false;
simple_script(_parent.play_action_val, _parent);
}
_root.gameTime = _parent.game_time_val;
_root.mathType = _parent.math_type_val;
_root.numberOfRows = _parent.number_rows_val;
_root.numberOfColumns = _parent.number_columns_val;
_root.XPosition = _parent.placement_x_val;
_root.YPosition = _parent.placement_y_val;
_root.boxWidth = _parent.box_width_val;
_root.boxHeight = _parent.box_height_val;
_root.padding = _parent.padding_val;
_root.addMax = _parent.add_max_val;
_root.subMax = _parent.sub_max_val;
_root.multMax = _parent.mult_max_val;
_root.divMax = _parent.div_max_val;
_root.correctSound = _parent.correct_sound_val;
_root.correctSoundObj = new Sound();
_root.correctSoundObj.attachSound(_root.correctSound);
_root.wrongSound = _parent.wrong_sound_val;
_root.wrongSoundObj = new Sound();
_root.wrongSoundObj.attachSound(_root.wrongSound);
_parent.anim.gotoAndStop(1);
simple_script(_parent.init_action_val, _parent);
var done = false;
var unloaded = false;
var ready = false;
}
onClipEvent (data) {
var changeQuestions = true;
var numberOfquestions = 1;
while (changeQuestions == true) {
if (0 < eval ("question" + numberOfquestions).length) {
_root["question" + numberOfquestions] = this["question" + numberOfquestions];
var i = 1;
while (_root.availableAnswers >= i) {
_root[(("answer" + numberOfquestions) + "_") + i] = this[(("answer" + numberOfquestions) + "_") + i];
i++;
}
numberOfquestions++;
} else {
changeQuestions = false;
}
}
_root.play();
}
onClipEvent (enterFrame) {
if (unloaded) {
return(undefined);
}
if (!ready) {
}
}
Instance of Symbol 73 MovieClip "bonusMC" in Symbol 78 MovieClip Frame 1
onClipEvent (load) {
function starttimer() {
bonusTimeLeft = BonusTime;
startTime = getTimer() / 1000;
_root.bonusScore = bonusTimeLeft;
}
BonusTime = 10;
startTimer();
}
onClipEvent (enterFrame) {
if (_root.gameMode == "play") {
var newTime = ((getTimer() / 1000) - startTime);
bonusTimeLeft = int(BonusTime - newTime);
_root.bonusScore = bonusTimeLeft;
if (bonusTimeLeft < 0) {
bonusTimeLeft = 0;
}
}
}
Symbol 80 MovieClip Frame 1
if (checkingWord == true) {
if (_root.wordscore != -1) {
_root.game.check_valid_word();
stop();
}
} else {
stop();
}
Symbol 80 MovieClip Frame 10
if (_root.testing == true) {
_root.wordScore = 10;
}
gotoAndPlay (1);
Symbol 90 Button
on (release) {
getURL ("http://www.gamesforyourwebsite.com", "_top");
}
Symbol 99 Button
on (release) {
timer.startTime = getTimer();
gotoAndStop ("setup");
}
Symbol 101 Button
on (release) {
getURL ("http://www.urgames.com/games/add-like-mad", "_top");
}
Symbol 103 Button
on (release) {
getURL ("http://www.urgames.com/games/subtraction-action", "_top");
}