Frame 1
function write_scores() {
time--;
scores = ((((((((("Level: " + level) + newline) + "Score: ") + score) + newline) + "Top Score: ") + _root.top_score) + newline) + "Time: ") + time;
}
function write_texts() {
num1_text = num1;
num2_text = num2;
answer_text = answer;
}
function next_level_add() {
level++;
score = score + Math.round((num1 + num2) / 2);
time_max = time_max + 0.45;
time = Math.round(time_max);
answer = 0;
difficulty = Math.round(difficulty * 1.3);
num1 = Math.round(Math.random() * difficulty);
num2 = Math.round(Math.random() * difficulty);
flashA.play();
}
function next_level_multiply() {
level++;
score = score + Math.round(num1 * num2);
time_max = time_max + 1;
time = Math.round(time_max);
answer = 0;
difficulty = Math.round(difficulty * 1.25);
num1 = Math.round(Math.random() * difficulty);
num2 = Math.round((Math.random() * 4) + 1);
flashA.play();
}
function lose_level_add() {
removeMovieClip("life" + lives);
lives--;
time = Math.round(time_max);
answer = 0;
num1 = Math.round(Math.random() * difficulty);
num2 = Math.round(Math.random() * difficulty);
flashA.play();
}
function lose_level_multiply() {
removeMovieClip("life" + lives);
lives--;
time = Math.round(time_max);
answer = 0;
num1 = Math.round(Math.random() * difficulty);
num2 = Math.round((Math.random() * 4) + 1);
flashA.play();
}
function gameplay_add() {
if (_root.score > _root.top_score) {
_root.top_score = _root.score;
scores = ((((((((("Level: " + level) + newline) + "Score: ") + score) + newline) + "Top Score: ") + _root.top_score) + newline) + "Time: ") + time;
}
if (answer_text == (num1 + num2)) {
_root.next_level_add();
_root.write_texts();
_root.write_scores();
}
if (time <= 0) {
_root.lose_level_add();
_root.write_texts();
_root.write_scores();
}
if (lives <= 0) {
end_game();
_root.flashA.play();
_root.gotoAndStop("die");
}
}
function gameplay_multiply() {
if (_root.score >= _root.top_score) {
_root.top_score = _root.score;
scores = ((((((((("Level: " + level) + newline) + "Score: ") + score) + newline) + "Top Score: ") + _root.top_score) + newline) + "Time: ") + time;
}
if (answer_text == (num1 * num2)) {
_root.next_level_multiply();
_root.write_texts();
_root.write_scores();
}
if (time <= 0) {
_root.lose_level_multiply();
_root.write_texts();
_root.write_scores();
}
if (lives <= 0) {
end_game();
_root.flashA.play();
_root.gotoAndStop("die");
}
}
function end_game() {
if (_root.lives > 0) {
var _local2 = 0;
while (_local2 < lives) {
removeMovieClip(_root["life" + (_local2 + 1)]);
_local2++;
}
}
clearInterval(_root.gameplay_interval);
clearInterval(_root.scores_interval);
}
Stage.showMenu = false;
var top_score = 0;
Instance of Symbol 22 MovieClip in Frame 1
onClipEvent (load) {
_root.stop();
this.loadBar.stop();
}
onClipEvent (enterFrame) {
if (_root.getBytesTotal() > 0) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
} else {
var percentage = Math.round(10 * (_root.getBytesLoaded() / _root.getBytesTotal()));
this.loadBar.gotoAndStop(percentage);
this.percentText = percentage + "/10";
}
}
}
on (press) {
_root.getURL("http://www.SnubbyLand.com/", "_blank");
}
Instance of Symbol 22 MovieClip in Frame 2
onClipEvent (load) {
this.loadBar.gotoAndStop(10);
}
Frame 12
stop();
Instance of Symbol 30 MovieClip in Frame 12
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
_root.gotoAndStop("addition");
}
Instance of Symbol 33 MovieClip in Frame 12
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
_root.gotoAndStop("multiplication");
}
Instance of Symbol 36 MovieClip in Frame 12
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
_root.flashA.play();
_root.gotoAndStop("instructions");
}
Instance of Symbol 38 MovieClip in Frame 12
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
getURL ("http://www.snubbyland.com/", "_blank");
}
Instance of Symbol 42 MovieClip in Frame 13
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
_root.flashA.play();
_root.gotoAndStop("menu");
}
Frame 14
stop();
var lives = 3;
var level = 0;
var score = 0;
var time_max = 4;
var time = time_max;
var num1 = 0;
var num2 = 0;
var answer = 0;
var difficulty = 3;
var a = 0;
while (a < lives) {
attachMovie("life", "life" + (a + 1), getNextHighestDepth());
if (a == 0) {
_root["life" + (a + 1)]._x = 10;
_root["life" + (a + 1)]._y = 10;
} else {
_root["life" + (a + 1)]._x = _root["life" + a]._x + 60;
_root["life" + (a + 1)]._y = 10;
}
a++;
}
var gameplay_interval = setInterval(_root.gameplay_add, 33.3333333333333);
var scores_interval = setInterval(_root.write_scores, 1000);
_root.next_level_add();
_root.write_scores();
_root.write_texts();
Instance of Symbol 42 MovieClip in Frame 14
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (press) {
_root.flashA.play();
_root.end_game();
_root.gotoAndStop("menu");
}
Instance of Symbol 52 MovieClip in Frame 14
on (keyPress "0") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 0;
_root.write_texts();
} else {
_root.answer = _root.answer + "0";
_root.write_texts();
}
}
}
on (keyPress "1") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 1;
_root.write_texts();
} else {
_root.answer = _root.answer + "1";
_root.write_texts();
}
}
}
on (keyPress "2") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 2;
_root.write_texts();
} else {
_root.answer = _root.answer + "2";
_root.write_texts();
}
}
}
on (keyPress "3") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 3;
_root.write_texts();
} else {
_root.answer = _root.answer + "3";
_root.write_texts();
}
}
}
on (keyPress "4") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 4;
_root.write_texts();
} else {
_root.answer = _root.answer + "4";
_root.write_texts();
}
}
}
on (keyPress "5") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 5;
_root.write_texts();
} else {
_root.answer = _root.answer + "5";
_root.write_texts();
}
}
}
on (keyPress "6") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 6;
_root.write_texts();
} else {
_root.answer = _root.answer + "6";
_root.write_texts();
}
}
}
on (keyPress "7") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 7;
_root.write_texts();
} else {
_root.answer = _root.answer + "7";
_root.write_texts();
}
}
}
on (keyPress "8") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 8;
_root.write_texts();
} else {
_root.answer = _root.answer + "8";
_root.write_texts();
}
}
}
on (keyPress "9") {
if (_root.answer.length <= 5) {
if (_root.answer == 0) {
_root.answer = 9;
_root.write_texts();
} else {
_root.answer = _root.answer + "9";
_root.write_texts();
}
}
}
on (keyPress "<Space>") {
_root.answer = 0;
_root.write_texts();
}
Frame 15
stop();
var lives = 3;
var level = 0;
var score = 0;
var time_max = 4;
var time = time_max;
var num1 = 0;
var num2 = 0;
var answer = 0;
var difficulty = 3;
var a = 0;
while (a < lives) {
attachMovie("life", "life" + (a + 1), getNextHighestDepth());
if (a == 0) {
_root["life" + (a + 1)]._x = 10;
_root["life" + (a + 1)]._y = 10;
} else {
_root["life" + (a + 1)]._x = _root["life" + a]._x + 60;
_root["life" + (a + 1)]._y = 10;
}
a++;
}
var gameplay_interval = setInterval(_root.gameplay_multiply, 33.3333333333333);
var scores_interval = setInterval(_root.write_scores, 1000);
_root.next_level_multiply();
_root.write_scores();
_root.write_texts();
Frame 16
end_text = ((("Score: " + _root.score) + newline) + "Top Score: ") + _root.top_score;
Symbol 25 MovieClip Frame 10
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 10
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 10
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 10
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 10
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 10
stop();