Frame 1
link_kennelclub = "http://forums.nintendokennelclub.com/";
dogs = 17;
totalQuestions = 10;
d1 = "German shepherd";
d2 = "golden retriever";
d3 = "toy poodle";
d4 = "Pembroke Welsh corgi";
d5 = "shiba inu";
d6 = "Yorkshire terrier";
d7 = "shih tzu";
d8 = "miniature schnauzer";
d9 = "Chihuahua";
d10 = "Shetland sheepdog";
d11 = "pug";
d12 = "miniature pinscher";
d13 = "boxer";
d14 = "cavalier King Charles spaniel";
d15 = "Labrador retriever";
d16 = "dachshund";
d17 = "beagle";
response0 = "What a doggone shame! Try again.";
response1 = "Nice try, but you must be a feline fan!";
response2 = "Nice try, but you must be a feline fan!";
response3 = "Nice try, but you must be a feline fan!";
response4 = "Nice try, but you must be a feline fan!";
response5 = "Nice job! You're showing some puppy love!";
response6 = "Nice job! You're showing some puppy love!";
response7 = "Nice job! You're showing some puppy love!";
response8 = "Nice job! You're showing some puppy love!";
response9 = "Great! You must have lots of four-legged friends!";
response10 = "Great job! You're a bone-a-fide genius!";
Frame 7
loaded = Math.round(getBytesLoaded());
total = Math.round(getBytesTotal());
percent = loaded / total;
status.txt = ("Loading " add Math.round(percent * 100)) + "%";
if (loaded == total) {
gotoAndPlay ("start");
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 15
stop();
Frame 23
stop();
Frame 32
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 9
stop();
Symbol 19 MovieClip Frame 18
gotoAndStop (1);
Symbol 23 Button
on (press) {
_parent._parent.gotoAndPlay("main");
}
Symbol 25 MovieClip Frame 25
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 2
stop();
Symbol 42 Button
on (press) {
_parent.answer.gotoAndPlay(_parent.answers);
gotoAndStop (2);
}
on (rollOver) {
_parent.dog.gotoAndStop(2);
}
on (rollOut) {
_parent.dog.gotoAndStop(1);
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 15
_parent._parent.rounds.push("incorrect");
_parent._parent.current++;
_parent._parent.gotoAndPlay("start");
stop();
Symbol 47 MovieClip Frame 30
_parent._parent.rounds.push("correct");
_parent._parent.current++;
_parent._parent.gotoAndPlay("start");
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 2
stop();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 2
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 2
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 2
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 2
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
stop();
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 3
stop();
Symbol 144 MovieClip Frame 4
stop();
Symbol 144 MovieClip Frame 5
stop();
Symbol 144 MovieClip Frame 6
stop();
Symbol 144 MovieClip Frame 7
stop();
Symbol 144 MovieClip Frame 8
stop();
Symbol 144 MovieClip Frame 9
stop();
Symbol 144 MovieClip Frame 10
stop();
Symbol 144 MovieClip Frame 11
stop();
Symbol 144 MovieClip Frame 12
stop();
Symbol 144 MovieClip Frame 13
stop();
Symbol 144 MovieClip Frame 14
stop();
Symbol 144 MovieClip Frame 15
stop();
Symbol 144 MovieClip Frame 16
stop();
Symbol 144 MovieClip Frame 17
stop();
Symbol 145 MovieClip Frame 1
function generateFillers() {
filler = new Array();
filler[0] = fillerArrays(0);
filler[1] = fillerArrays(4);
filler[2] = fillerArrays(8);
filler[3] = fillerArrays(12);
filler[4] = fillerArrays(16);
filler[5] = fillerArrays2(0);
filler[6] = fillerArrays2(4);
filler[7] = fillerArrays2(8);
filler[8] = fillerArrays2(12);
filler[9] = fillerArrays2(16);
return(filler);
}
function fillerArrays(num) {
j = 1;
while (j <= 4) {
c = num;
fillers = new Array();
fillers.push(rand_arr[num]);
if (rand_arr[num + 1] != null) {
fillers.push(rand_arr[num + 1]);
} else {
fillers.push(rand_arr[0]);
}
if (rand_arr[num + 2] != null) {
fillers.push(rand_arr[num + 2]);
} else {
fillers.push(rand_arr[1]);
}
if (rand_arr[num + 3] != null) {
fillers.push(rand_arr[num + 3]);
} else {
fillers.push(rand_arr[2]);
}
j++;
}
return(fillers);
}
function fillerArrays2(num) {
j = 1;
while (j <= 4) {
c = num;
fillers2 = [];
fillers2.push(rand_arr2[num]);
if (rand_arr2[num + 1] != null) {
fillers2.push(rand_arr2[num + 1]);
} else {
fillers2.push(rand_arr2[0]);
}
if (rand_arr2[num + 2] != null) {
fillers2.push(rand_arr2[num + 2]);
} else {
fillers2.push(rand_arr2[1]);
}
if (rand_arr2[num + 3] != null) {
fillers2.push(rand_arr2[num + 3]);
} else {
fillers2.push(rand_arr2[2]);
}
j++;
}
return(fillers2);
}
function generateHints() {
hints = [];
k = 0;
while (k <= total) {
rand2 = randomNumber();
hints[k] = filler[k][rand2];
k++;
}
return(hints);
}
function numCount() {
if (number == 3) {
number = 0;
} else {
number++;
}
return(number);
}
function buildAnswers() {
i = 1;
while (i <= _parent.totalQuestions) {
string_arr = dogs_arr.splice(random(dogs_arr.length), 1);
answers.push(string_arr);
i++;
}
return(answers);
}
function buildQuestions() {
question = new Array();
j = 0;
while (j < _parent.totalQuestions) {
question[j] = buildArrays2(answers[j]);
findMatches(question[j], answers[j]);
j++;
}
}
function setMax(b) {
maxVal = _parent.dogs - b;
return(maxVal);
}
function buildArrays2(a) {
questions_arr = new Array();
questions_arr2 = new Array();
position = randomNumber();
i = 0;
while (i < filler.length) {
if (searchArray(filler[i], a) != null) {
pos = i;
pos2 = searchArray(filler[i], a);
}
i++;
}
questions_arr = filler[pos];
questions_arr.splice(pos2, 1, a);
questions_arr2 = questions_arr.shuffle();
return(questions_arr2);
}
function searchArray(whichArray, searchElement) {
g = 0;
while (g < whichArray.length) {
if (searchElement eq whichArray[g]) {
return(g);
}
g++;
}
return(null);
}
function checkRand(num1, num2) {
if (num1 == num2) {
return(true);
}
return(false);
}
function randomNumber() {
randNum = Math.floor(random(4));
return(randNum);
}
function randomValue(minVal, maxVal) {
val = Math.floor(Math.random() * Number(_parent.dogs));
return(val);
}
function findMatches(testVar, answer) {
var _local3 = 0;
var _local4 = 0;
var _local6 = 0;
keepChecking = true;
while (keepChecking) {
_local3 = 0;
compare = new Array();
i = 0;
while (i < testVar.length) {
match = testVar[i];
if ((match != answer) and (match == testVar[i - 1])) {
testVar[i - 1] = randomValue(1, Number(_parent.dogs));
}
y = 0;
while (y < testVar.length) {
if ((i != y) and (match == testVar[y])) {
_local3 = _local3 + 1;
if (_local3 > 1) {
compare.push(match);
}
}
_local4++;
y++;
}
_local4 = 0;
i++;
}
_local3 = 0;
k = 0;
while (k < testVar.length) {
if ((compare[0] != answer) and (compare[0] == testVar[k])) {
testVar[k] = randomValue(1, Number(_parent.dogs));
}
k++;
}
_local6++;
_local6 = 10;
if (_local6) {
keepChecking = false;
} else {
keepChecking = true;
}
}
}
current = 0;
total = _parent.totalQuestions - 1;
string_arr = new Array();
group_arr = new Array();
dogs_arr = new Array();
rounds = new Array();
answers = new Array();
rand_arr = new Array();
rand_arr2 = new Array();
i = 1;
while (i <= _parent.dogs) {
dogs_arr.push(i);
i++;
}
Array.prototype.shuffle = function () {
var _local2 = 0;
arrayOut = [];
while (_local2 < this.length) {
index = random(this.length);
while (arrayOut[index] != undefined) {
((index == (this.length - 1)) ? ((index = 0)) : (index++));
}
arrayOut[index] = this[_local2];
_local2++;
}
return(arrayOut);
};
rand_arr = dogs_arr.shuffle();
rand_arr2 = dogs_arr.shuffle();
generateFillers();
number = 0;
generateHints();
buildAnswers();
buildQuestions();
Symbol 145 MovieClip Frame 13
breed.txt = eval ("_parent.d" add answers[current]) add " ?";
count.txt = (current + 1) add " of 10";
Symbol 145 MovieClip Frame 20
breed.txt = eval ("_parent.d" add answers[current]) add " ?";
count.txt = (current + 1) add " of 10";
if (current < _parent.totalQuestions) {
play();
} else {
_parent.rounds = rounds;
_parent.gotoAndPlay("end");
}
Symbol 145 MovieClip Frame 21
dog1.gotoAndStop("d" add question[current][0]);
if (answers[current] == question[current][0]) {
dog1.answers = "correct";
} else {
dog1.answers = "incorrect";
}
Symbol 145 MovieClip Frame 23
dog2.gotoAndStop("d" add question[current][1]);
if (answers[current] == question[current][1]) {
dog2.answers = "correct";
} else {
dog2.answers = "incorrect";
}
Symbol 145 MovieClip Frame 25
dog3.gotoAndStop("d" add question[current][2]);
if (answers[current] == question[current][2]) {
dog3.answers = "correct";
} else {
dog3.answers = "incorrect";
}
Symbol 145 MovieClip Frame 27
dog4.gotoAndStop("d" add question[current][3]);
if (answers[current] == question[current][3]) {
dog4.answers = "correct";
} else {
dog4.answers = "incorrect";
}
Symbol 145 MovieClip Frame 35
stop();
Symbol 159 Button
on (release) {
getURL ("http://www.nintendogs.com", "_blank");
}
Symbol 161 MovieClip Frame 1
correct = 0;
incorrect = 0;
i = 0;
while (i <= _parent.rounds.length) {
if (_parent.rounds[i] == "correct") {
correct++;
} else if (_parent.rounds[i] == "correct") {
incorrect++;
}
i++;
}
Symbol 161 MovieClip Frame 10
score.txt = (correct add "/") add _parent.totalQuestions;
Symbol 161 MovieClip Frame 11
comment.txt = eval ("_parent.response" add correct);
Symbol 161 MovieClip Frame 20
stop();