Frame 1
var contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
menu = contextMenu;
stop();
_root.WPI_ArcadeStartSingleGame = function () {
trace("WPI_ArcadeStartSingleGame called - the current game has started");
};
_root.WPI_ArcadeStopSingleGame = function (score) {
trace("WPI_ArcadeStopSingleGame called - the current game has finished with score: " + score);
};
Frame 2
Array.prototype.Contains = function (value) {
var _local3 = -1;
var _local2 = 0;
_local2 = 0;
while (_local2 < this.length) {
if (this[_local2] == value) {
_local3 = _local2;
}
_local2++;
}
return(_local3);
};
Array.prototype.zeroContains = function (value) {
var _local3 = -1;
var _local2 = 0;
_local2 = 0;
while (_local2 < this.length) {
if (this[_local2][0] == value) {
_local3 = _local2;
}
_local2++;
}
return(_local3);
};
String.prototype.replace = function () {
var _local7 = arguments[0];
var _local6 = arguments[1];
var _local8 = this;
var _local5 = "";
var _local4 = _local8.split(_local7);
_local5 = _local4[0];
var _local3 = 1;
while (_local3 < _local4.length) {
_local5 = _local5 + (_local6 + _local4[_local3]);
_local3++;
}
return(_local5);
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
Frame 35
stop();
Symbol 5 MovieClip Frame 17
gotoAndPlay (15);
Symbol 6 Button
on (release) {
getURL ("http://www.wiggiworld.com", "_blank");
}
Symbol 15 MovieClip Frame 15
stop();
Symbol 17 Button
on (release) {
_root.gotoAndPlay("start");
plyBut.enabled = false;
}
Symbol 31 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
bl = _root.getBytesLoaded();
bt = _root.getBytesTotal();
perc = (bl / bt) * 100;
bar.bar._xscale = perc;
if (perc >= 100) {
this.gotoAndPlay("goplay");
delete this.onEnterFrame;
}
};
Symbol 31 MovieClip Frame 25
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 1
bT.text = _parent.bText;
Symbol 97 MovieClip [mcQuestButton] Frame 1
stop();
Symbol 97 MovieClip [mcQuestButton] Frame 18
stop();
this.removeMovieClip();
Symbol 108 MovieClip [mcRedXContainer] Frame 1
stop();
Symbol 108 MovieClip [mcRedXContainer] Frame 6
_parent._parent._parent._parent.sfxBoom.start();
Symbol 108 MovieClip [mcRedXContainer] Frame 43
gotoAndStop ("clear");
Symbol 108 MovieClip [mcRedXContainer] Frame 48
_parent._parent._parent._parent.sfxBoom.start();
Symbol 108 MovieClip [mcRedXContainer] Frame 85
_parent._parent.play();
gotoAndStop ("clear");
Symbol 114 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 6
stop();
Symbol 127 MovieClip Frame 55
stop();
_parent.play();
Symbol 128 MovieClip Frame 1
currentDate = new Date();
lastSecond = currentDate.getTime();
Symbol 128 MovieClip Frame 25
curDte = new Date();
tSec = curDte.getTime();
secDiff = (tSec - lastSecond) / 1000;
_parent.curFPS = Math.round(_parent.plySpd / secDiff);
Symbol 213 MovieClip Frame 40
stop();
Symbol 215 MovieClip Frame 50
stop();
Symbol 324 MovieClip Frame 60
ex.onRelease = function () {
};
cr.onRelease = function () {
_parent.credits.play();
st.enabled = false;
cr.enabled = false;
ex.enabled = false;
};
st.onRelease = function () {
_root.WPI_ArcadeStartSingleGame();
_parent._parent.play();
st.enabled = false;
cr.enabled = false;
ex.enabled = false;
};
Symbol 324 MovieClip Frame 75
stop();
Symbol 331 MovieClip Frame 1
_parent.buttons.ex.enabled = true;
_parent.buttons.cr.enabled = true;
_parent.buttons.st.enabled = true;
stop();
Symbol 331 MovieClip Frame 34
stop();
cl.onRelease = function () {
play();
};
Symbol 332 MovieClip Frame 30
_parent.bgm[2].trgVol = 100;
Symbol 332 MovieClip Frame 70
stop();
Symbol 520 MovieClip Frame 1
l.cacheAsBitmap = true;
m.cacheAsBitmap = true;
l.setMask(m);
b.setMask(m2);
Symbol 543 MovieClip Frame 59
con.onRelease = function () {
play();
};
stop();
Symbol 543 MovieClip Frame 88
stop();
Symbol 543 MovieClip Frame 120
stop();
Symbol 543 MovieClip Frame 151
stop();
Symbol 543 MovieClip Frame 160
stop();
_parent.bgm[2].trgVol = 0;
_parent.bgm[0].trgVol = 110;
_parent.play();
Symbol 616 MovieClip Frame 1
cur = "off";
stop();
Symbol 616 MovieClip Frame 2
cur = "left";
l.setMask(m);
l.cacheAsBitmap = true;
m.cacheAsBitmap = true;
Symbol 616 MovieClip Frame 3
cur = "top";
l.setMask(m);
l.cacheAsBitmap = true;
m.cacheAsBitmap = true;
Symbol 616 MovieClip Frame 4
cur = "right";
l.setMask(m);
l.cacheAsBitmap = true;
m.cacheAsBitmap = true;
Symbol 616 MovieClip Frame 5
cur = "bottom";
l.setMask(m);
l.cacheAsBitmap = true;
m.cacheAsBitmap = true;
Symbol 626 MovieClip Frame 1
stop();
Symbol 829 MovieClip Frame 1
stop();
Symbol 829 MovieClip Frame 26
stop();
Symbol 829 MovieClip Frame 51
stop();
Symbol 882 MovieClip Frame 1
qYes.onRelease = function () {
_parent._parent._parent._parent.nextFrame();
_parent._parent._parent.sfxBell.start();
qNo.enabled = false;
qYes.enabled = false;
};
qNo.onRelease = function () {
_parent.play();
qNo.enabled = false;
qYes.enabled = false;
};
Symbol 883 MovieClip Frame 1
stop();
Symbol 883 MovieClip Frame 20
stop();
Symbol 883 MovieClip Frame 35
_parent._parent.paus = false;
_parent.bPause.but.enabled = true;
_parent.quit.enabled = true;
Symbol 904 MovieClip Frame 1
but.onRelease = function () {
if (!_parent._parent.paus) {
_parent._parent.paus = true;
_parent._parent._parent.bgm[0].trgVol = 0;
gotoAndStop (2);
}
};
stop();
Symbol 904 MovieClip Frame 2
but.onRelease = function () {
_parent._parent.paus = false;
_parent._parent._parent.bgm[0].trgVol = 110;
gotoAndStop (1);
};
Symbol 914 MovieClip Frame 1
function movePlanets() {
if (pD1._x < -300) {
pD1._x = pD1._x + ((-300 - pD1._x) / 15);
}
if (pD2._x > 300) {
pD2._x = pD2._x - ((pD2._x - 300) / 15);
}
if ((pD1._x >= -301) && (pD2._x <= 301)) {
clearInterval(planetInt);
}
}
if (_quality == "MEDIUM") {
_parent.savQual = "MEDIUM";
_quality = "HIGH";
} else if (_quality == "LOW") {
_parent.savQual = "LOW";
_quality = "MEDIUM";
} else {
_parent.saveQual = "HIGH";
}
var ref = _parent._parent._parent;
txt1.htmlText = ((("<b>The Wiggies of <font color='#6699FF'>" + ref.objects[ref.questP1].name) + "</font> and the Wiggies of <font color='#6699FF'>") + ref.objects[ref.questP2].name) + "</font> are fighting! Now that their planets are together, you can make them into friends!</b>";
var reqSent = "";
if (ref.questReqs.length == 1) {
reqSent = ref.questRS[ref.questReqs[0]].name;
} else {
var i = 0;
while (i < (ref.questReqs.length - 1)) {
if (i > 0) {
reqSent = reqSent.concat(", ");
}
reqSent = reqSent.concat(ref.questRS[ref.questReqs[i]].name);
i++;
}
reqSent = reqSent.concat(" or " + ref.questRS[ref.questReqs[ref.questReqs.length - 1]].name);
}
txt2.htmlText = ("<b>In each case, choose the <font color='#FF9900'>" + reqSent) + "</font> thing to do! There may be many nice answers - but only one will be an example of the value you are looking for. The faster you answer, the more points you get!</b>";
ref._parent.bgm[0].trgVol = 0;
ref._parent.bgm[0].fade = 7;
ref._parent.bgm[1].trgVol = 100;
ref._parent.bgm[1].fade = 7;
go.onRelease = function () {
_parent.questAnsd = 0;
_parent.play();
};
pD1.gotoAndStop(ref.objects[ref.questP1].dis);
pD2.gotoAndStop(ref.objects[ref.questP2].dis);
clearInterval(planetInt);
planetInt = setInterval(this, "movePlanets", 40);
Symbol 921 MovieClip Frame 1
def.text = _parent._parent.catDef;
Symbol 922 MovieClip Frame 1
stop();
Symbol 922 MovieClip Frame 14
stop();
Symbol 933 MovieClip Frame 1
colour1 = new Color(col1);
colour2 = new Color(col2);
rL = _parent._parent.wiggiRed;
gL = _parent._parent.wiggiGreen;
bL = _parent._parent.wiggiBlue;
rLSh = rL + 40;
gLSh = gL + 40;
bLSh = bL + 40;
if (rLSh > 255) {
rLSh = 255;
}
if (gLSh > 255) {
gLSh = 255;
}
if (bLSh > 255) {
bLSh = 255;
}
colour1.setTint(rL, gL, bL, 100);
colour2.setTint(rLSh, gLSh, bLSh, 100);
Symbol 935 MovieClip Frame 1
gotoAndStop(_parent.wiggiHand);
Symbol 944 MovieClip Frame 1
gotoAndStop(_parent.wiggiFoot);
Symbol 996 MovieClip Frame 1
eyes.gotoAndStop(_parent.wiggiEyes);
hair.gotoAndStop(_parent.wiggiHair);
access.gotoAndStop(_parent.wiggiAccess);
mouth.gotoAndStop(_parent.wiggiMouth);
colour1 = new Color(col1);
colour2 = new Color(col2);
colour3 = new Color(col3);
rL = _parent.wiggiRed;
gL = _parent.wiggiGreen;
bL = _parent.wiggiBlue;
rLSh = rL + 40;
gLSh = gL + 40;
bLSh = bL + 40;
rLSh2 = rL - 40;
gLSh2 = gL - 40;
bLSh2 = bL - 40;
if (rLSh > 255) {
rLSh = 255;
}
if (gLSh > 255) {
gLSh = 255;
}
if (bLSh > 255) {
bLSh = 255;
}
if (rLSh2 < 0) {
rLSh2 = 0;
}
if (gLSh2 < 0) {
gLSh2 = 0;
}
if (bLSh2 < 0) {
bLSh2 = 0;
}
colour1.setTint(rL, gL, bL, 100);
colour2.setTint(rLSh, gLSh, bLSh, 100);
colour3.setTint(rLSh2, gLSh2, bLSh2, 100);
Symbol 998 MovieClip Frame 1
function time() {
if (_parent.timOn) {
var _local6 = new Date();
var _local5 = _local6.getTime();
if (lastTme != 0) {
_parent.tim = _parent.tim + (_local5 - lastTme);
}
lastTme = _local5;
var _local2 = Math.floor(_parent.tim / 60000);
var _local3 = Math.floor((_parent.tim - (_local2 * 60000)) / 1000);
var _local4 = Math.floor(((_parent.tim - (_local2 * 60000)) - (_local3 * 1000)) / 10);
if (_local2 < 10) {
_local2 = "0" + _local2;
}
if (_local3 < 10) {
_local3 = "0" + _local3;
}
if (_local4 < 10) {
_local4 = "0" + _local4;
}
timeD.text = (((_local2 + ":") + _local3) + ":") + _local4;
} else {
timeD.text = "00:00:00";
if (_parent.tim > 0) {
_parent.tim = ref.questTmeAllw;
}
}
}
var ref = _parent._parent._parent;
var lastTme = 0;
_parent.firstTime = true;
_parent.tim = 0;
_parent.correct = false;
_parent.score = 0;
clearInterval(_parent.timeInt);
_parent.timeInt = setInterval(this, "time", 40);
var k = ref.questReqs[_parent.questAnsd % ref.questReqs.length];
var s1_1;
var s1_2;
var s1_3;
var s2_1;
var s2_2;
var s2_3;
var catDef = ref.questRS[k].def;
if ((_parent.questAnsd % 4) == 0) {
questP1 = ref.questP1;
questP2 = ref.questP2;
pers1 = 0;
pers2 = 0;
} else if ((_parent.questAnsd % 4) == 1) {
questP1 = ref.questP2;
questP2 = ref.questP1;
pers1 = 0;
pers2 = 1;
} else if ((_parent.questAnsd % 4) == 2) {
questP1 = ref.questP1;
questP2 = ref.questP2;
pers1 = 1;
pers2 = 1;
} else if ((_parent.questAnsd % 4) == 3) {
questP1 = ref.questP2;
questP2 = ref.questP1;
pers1 = 1;
pers2 = 0;
}
txt1.htmlText = ref.questRS[k].quest.replace("%i1%", ("<font color='#6699FF'>" + ref.objects[questP1].ppl[pers1].split("::")[0]) + "</font>").replace("%p1%", ("<font color='#6699FF'>" + ref.objects[questP1].name) + "</font>").replace("%i2%", ("<font color='#6699FF'>" + ref.objects[questP2].ppl[pers2].split("::")[0]) + "</font>").replace("%p2%", ("<font color='#6699FF'>" + ref.objects[questP2].name) + "</font>");
if (ref.objects[questP1].ppl[pers1].split("::")[1] == "f") {
s1_1 = "her";
s1_2 = "she";
s1_3 = "her";
} else {
s1_1 = "him";
s1_2 = "he";
s1_3 = "his";
}
if (ref.objects[questP2].ppl[pers2].split("::")[1] == "f") {
s2_1 = "her";
s2_2 = "she";
s2_3 = "her";
} else {
s2_1 = "him";
s2_2 = "he";
s2_3 = "his";
}
wigz1.wiggiHair = ref.objects[questP1].ppl[pers1].split("::")[2];
wigz1.wiggiEyes = ref.objects[questP1].ppl[pers1].split("::")[3];
wigz1.wiggiMouth = ref.objects[questP1].ppl[pers1].split("::")[4];
wigz1.wiggiAccess = ref.objects[questP1].ppl[pers1].split("::")[5];
wigz1.wiggiFoot = ref.objects[questP1].ppl[pers1].split("::")[6];
wigz1.wiggiHand = ref.objects[questP1].ppl[pers1].split("::")[7];
wigz1.wiggiRed = ref.objects[questP1].colRed;
wigz1.wiggiGreen = ref.objects[questP1].colGreen;
wigz1.wiggiBlue = ref.objects[questP1].colBlue;
wigz2.wiggiHair = ref.objects[questP2].ppl[pers2].split("::")[2];
wigz2.wiggiEyes = ref.objects[questP2].ppl[pers2].split("::")[3];
wigz2.wiggiMouth = ref.objects[questP2].ppl[pers2].split("::")[4];
wigz2.wiggiAccess = ref.objects[questP2].ppl[pers2].split("::")[5];
wigz2.wiggiFoot = ref.objects[questP2].ppl[pers2].split("::")[6];
wigz2.wiggiHand = ref.objects[questP2].ppl[pers2].split("::")[7];
wigz2.wiggiRed = ref.objects[questP2].colRed;
wigz2.wiggiGreen = ref.objects[questP2].colGreen;
wigz2.wiggiBlue = ref.objects[questP2].colBlue;
wigz2.gotoAndPlay(8);
var award = 100;
var numAnss = Math.min(Math.floor(ref.pMatches / 3) + 3, 5);
var rightAns = Math.floor(Math.random() * numAnss);
var fakeAnsU = new Array();
var i = 0;
while (i < numAnss) {
var init = new Object();
var done = false;
if (i == rightAns) {
var j;
var t = new Array();
do {
j = Math.round(Math.random() * (ref.questRS[k].ans.length - 1));
if (t.Contains(j) <= -1) {
t.push(j);
}
if (t.length == ref.questRS[k].ans.length) {
var resetAns = true;
break;
}
} while (ref.questRS[k].rAns.Contains(j) > -1);
if (resetAns) {
ref.questRS[k].rAns = [];
j = Math.round(Math.random() * (ref.questRS[k].ans.length - 1));
}
ref.questRS[k].rAns.push(j);
init.bText = ref.questRS[k].ans[j].split("::")[0].replace("%s1%", s1_1).replace("%_s1%", s1_2).replace("%-s1%", s1_3).replace("%s2%", s2_1).replace("%_s2%", s2_2).replace("%-s2%", s2_3);
init.correct = true;
trace(init.bText + " is the correct answer.");
} else {
while (!done) {
var resetAll = false;
var c;
var t = new Array();
do {
c = Math.round(Math.random() * (ref.questRS.length - 1));
if (t.Contains(c) <= -1) {
t.push(c);
}
if (t.length == ref.questRS.length) {
resetAll = true;
trace("Broken - all categories full!");
break;
}
} while ((c == k) || (ref.questRS[c].fAns.length == ref.questRS[c].ans.length));
if (!resetAll) {
var a;
var noGo;
do {
noGo = false;
a = Math.round(Math.random() * (ref.questRS[c].ans.length - 1));
if (ref.questRS[c].fAns.Contains(a) <= -1) {
ref.questRS[c].fAns.push(a);
} else {
noGo = true;
}
if (ref.questRS[c].fAns.length == ref.questRS[c].ans.length) {
resetAll = true;
break;
}
} while (((fakeAnsU.Contains((c + "-") + a) > -1) || (noGo)) || (ref.questRS[c].ans[a].split("::")[1].indexOf(("|" + k) + "|") != -1));
if (!resetAll) {
init.bText = ref.questRS[c].ans[a].split("::")[0].replace("%s1%", s1_1).replace("%_s1%", s1_2).replace("%-s1%", s1_3).replace("%s2%", s2_1).replace("%_s2%", s2_2).replace("%-s2%", s2_3);
init.correct = false;
trace(init.bText + " is a fake answer.");
fakeAnsU.push((c + "-") + a);
done = true;
}
} else {
var i2 = 0;
while (i2 < ref.questRS.length) {
ref.questRS[i2].fAns = [];
i2++;
}
}
}
}
init._y = -9 + (54 * i);
this.attachMovie("mcQuestButton", "b" + i, this.getNextHighestDepth(), init);
this["b" + i].buh.onRelease = function () {
if (this._parent._parent.redX._currentframe == 1) {
with (ref.inter.quest) {
ref.inter.quest.timeBonus = Math.round(50 - (Math.min(tim / _parent._parent.questTmeAllw, 1) * 50));
if (this._parent.correct) {
correct = true;
score = this._parent._parent.award;
redX.gotoAndPlay("greenC");
_parent._parent.sfxBell.start();
} else {
this._parent._parent.award = Math.round(this._parent._parent.award / 2);
this._parent.gotoAndPlay("out");
timOn = false;
redX.gotoAndPlay("redX");
if (valueInfo._currentframe == 1) {
valueInfo.gotoAndPlay("info");
}
_parent._parent.sfxBuzzer.start();
ref.inter.quest.firstTime = false;
}
}
}
};
i++;
}
trace(((((((("FAKE ANSWERS: " + fakeAnsU) + " REAL ANSWER: ") + k) + "-") + j) + " in slot ") + rightAns) + "!");
this.attachMovie("mcRedXContainer", "redX", this.getNextHighestDepth());
Symbol 1041 MovieClip Frame 1
stop();
Symbol 1041 MovieClip Frame 20
stop();
Symbol 1041 MovieClip Frame 39
stop();
Symbol 1047 MovieClip Frame 1
stop();
Symbol 1047 MovieClip Frame 2
plae.text = (("Friendly Planets: " + ((_parent.ref.pMatches * 2) + 1)) + "/") + (_parent.ref.objects.length - 3);
Symbol 1047 MovieClip Frame 24
gotoAndPlay ("flash");
Symbol 1048 MovieClip Frame 1
function moveQuest() {
if (fireworks._currentframe == 1) {
fireworks.gotoAndPlay("goodJob");
}
if (_parent.clearToMove) {
if (_y < trgY) {
_y = (_y + ((trgY - _y) / 10));
}
if (_y >= (trgY - 0.5)) {
clearInterval(mvQuest);
trace("Quest 3 moved.");
}
}
}
function fader() {
_alpha = (_alpha - 4);
if (_alpha <= 0) {
_parent.play();
}
}
function showScore() {
if (timeB.text == "") {
timeB.text = ("(Time Bonus: " + _parent.timeBonus) + ")";
ref.sfxDrums.start();
} else if (pointsA.text == "") {
pointsA.text = "Points Awarded: " + (_parent.timeBonus + _parent.score);
ref.score = ref.score + (_parent.timeBonus + _parent.score);
ref.inter.score.text = "Score: " + Math.round(ref.score);
} else {
clearInterval(scoreInt);
go.onRelease = function () {
if (!_parent.nextQuestion) {
if (((ref.objects.length - 4) - (ref.pMatches * 2)) <= 0) {
ref.paus = true;
ref._parent.nextFrame();
} else {
ref._parent.bgm[0].trgVol = 110;
ref._parent.bgm[0].fade = 5;
clearInterval(fadeInt);
fadeInt = setInterval(this._parent, "fader", 40);
if ((ref.pMatches % 2) == 1) {
ref.addAst();
}
if (ref.pMatches == 1) {
ref.lastInsta = ref.gameTim;
ref.instaTexts = 6;
}
ref.hsFuel = 100;
ref.inter.hsMask._xscale = (ref.hsFuel / 100) * 100;
ref.hsFuelU = ref.hsFuelU * 0.95;
ref.questTmeAllw = ref.questTmeAllw * 0.95;
}
} else {
_parent.play();
}
};
go._visible = true;
if (!_parent.nextQuestion) {
planetsM.gotoAndPlay("flash");
}
}
}
var ref = _parent._parent._parent;
var compliments = ["fantastic", "a galactic mediator", "an amazing problem solver", "a perfect resolution finder", "a planet saver", "an excellent conflict resolver", "very virtuous", "the question king (or queen)", "the best of the best"];
txt1.htmlText = "<b>Well done; you selected a great answer!</b>";
_parent.questAnsd++;
var trgY = ((_height / 2) + 75);
if (_parent.questAnsd == (2 + Math.floor((ref.pMatches + 2) / 3))) {
_parent.nextQuestion = false;
ref._parent.bgm[1].trgVol = 0;
ref._parent.bgm[1].fade = 10;
ref.sfxFanfare.start();
clearInterval(mvQuest);
mvQuest = setInterval(this, "moveQuest", 60);
txt1.htmlText = txt1.htmlText + (((((("<b>Congrats! You have made <font color='#6699FF'>" + ref.objects[ref.questP1].name) + "</font> and <font color='#6699FF'>") + ref.objects[ref.questP2].name) + "</font> into friends! You truly are <font color='#6699FF'>") + compliments[Math.round(Math.random() * (compliments.length - 1))]) + "</font></b>!");
} else {
_parent.nextQuestion = true;
txt1.htmlText = txt1.htmlText + "<br /><b>Keep it up! Move on to the next problem when you are ready.</b>";
}
timeB.text = "";
pointsA.text = "";
go._visible = false;
ref.qAnsd++;
if (_parent.firstTime) {
ref.qCorFirst++;
}
clearInterval(scoreInt);
scoreInt = setInterval(this, "showScore", 1200);
Symbol 1051 MovieClip Frame 1
var tim;
var timOn;
stop();
Symbol 1051 MovieClip Frame 21
stop();
Symbol 1051 MovieClip Frame 36
timOn = false;
Symbol 1051 MovieClip Frame 55
timOn = true;
stop();
Symbol 1051 MovieClip Frame 56
timOn = false;
clearToMove = false;
Symbol 1051 MovieClip Frame 70
clearToMove = true;
stop();
Symbol 1051 MovieClip Frame 78
if (nextQuestion) {
gotoAndPlay ("questNext");
}
Symbol 1051 MovieClip Frame 102
_parent._parent.paus = false;
_parent.bPause.but.enabled = true;
_parent.quit.enabled = true;
_quality = savQual;
gotoAndStop ("clear");
Symbol 1059 MovieClip Frame 1
function pnt() {
point._rotation = _parent._parent._parent.closePoint;
}
pnt();
clearInterval(pointInt);
pointInt = setInterval(this, "pnt", 300);
if (_parent._parent._parent.planetAdv > -1) {
pName.text = _parent.pName + " says:";
} else {
pName.text = "This Planet says:";
}
Symbol 1060 MovieClip Frame 1
saysIn = false;
stop();
Symbol 1060 MovieClip Frame 2
pName = _parent._parent.objects[_parent._parent.planetAdv].name;
saysIn = false;
Symbol 1060 MovieClip Frame 85
saysIn = true;
stop();
Symbol 1060 MovieClip Frame 86
saysIn = false;
Symbol 1079 MovieClip Frame 1
_parent.quit.enabled = true;
_parent.bPause.enabled = true;
stop();
Symbol 1079 MovieClip Frame 2
function cl() {
stillOn = false;
}
function checkZ() {
tim++;
if (Key.isDown(90) && (tim > 30)) {
cl();
}
if ((inst._alpha < 99) && (stillOn)) {
inst._alpha = inst._alpha + ((100 - inst._alpha) / 3);
} else if ((inst._alpha > 0) && (!stillOn)) {
inst._alpha = inst._alpha - 15;
if (inst._alpha <= 0) {
_parent._parent.paus = false;
gotoAndStop ("clear");
}
}
}
var stillOn = true;
var tim = 0;
go.onRelease = cl;
clearInterval(zInt);
zInt = setInterval(this, "checkZ", 60);
Symbol 1079 MovieClip Frame 3
function cl() {
stillOn = false;
}
function checkZ() {
tim++;
if (Key.isDown(90) && (tim > 30)) {
cl();
}
if ((inst._alpha < 100) && (stillOn)) {
inst._alpha = inst._alpha + ((100 - inst._alpha) / 3);
} else if ((inst._alpha > 0) && (!stillOn)) {
inst._alpha = inst._alpha - 15;
if (inst._alpha <= 0) {
_parent._parent.paus = false;
gotoAndStop ("clear");
}
}
}
var stillOn = true;
var tim = 0;
go.onRelease = cl;
clearInterval(zInt);
zInt = setInterval(this, "checkZ", 60);
Symbol 1079 MovieClip Frame 4
function cl() {
stillOn = false;
}
function checkZ() {
tim++;
if (Key.isDown(90) && (tim > 30)) {
cl();
}
if ((inst._alpha < 100) && (stillOn)) {
inst._alpha = inst._alpha + ((100 - inst._alpha) / 3);
} else if ((inst._alpha > 0) && (!stillOn)) {
inst._alpha = inst._alpha - 15;
if (inst._alpha <= 0) {
_parent._parent.paus = false;
gotoAndStop ("clear");
}
}
}
var stillOn = true;
var tim = 0;
go.onRelease = cl;
clearInterval(zInt);
zInt = setInterval(this, "checkZ", 60);
Symbol 1079 MovieClip Frame 5
function cl() {
stillOn = false;
}
function checkZ() {
tim++;
if (Key.isDown(90) && (tim > 30)) {
cl();
}
if ((inst._alpha < 100) && (stillOn)) {
inst._alpha = inst._alpha + ((100 - inst._alpha) / 3);
} else if ((inst._alpha > 0) && (!stillOn)) {
inst._alpha = inst._alpha - 15;
if (inst._alpha <= 0) {
_parent._parent.paus = false;
gotoAndStop ("clear");
}
}
}
var stillOn = true;
var tim = 0;
go.onRelease = cl;
clearInterval(zInt);
zInt = setInterval(this, "checkZ", 60);
Symbol 1080 MovieClip Frame 1
hsBar.setMask(hsMask);
qHigh.onRelease = function () {
_quality = "HIGH";
};
qMed.onRelease = function () {
_quality = "MEDIUM";
};
qLow.onRelease = function () {
_quality = "LOW";
};
quit.onRelease = function () {
if (!_parent.paus) {
_parent.paus = true;
quitConf.gotoAndPlay("in");
this.enabled = false;
bPause.but.enabled = false;
}
};
Symbol 1081 MovieClip Frame 1
function astPos(w) {
var _local3;
var _local2;
do {
_local3 = round((rando() * 2) - 1);
} while (!_local3);
do {
_local2 = round((rando() * 2) - 1);
} while (!_local2);
objects[w].x = (scrnX + ship._x) + (_local3 * ((rando() * 1500) + mMRad));
objects[w].y = (scrnY + ship._y) + (_local2 * ((rando() * 1500) + mMRad));
var _local7 = (rando() * 7) + 3;
var _local9 = (scrnX + ship._x) + ((xVel * 25) * _local7);
var _local8 = (scrnY + ship._y) + ((yVel * 25) * _local7);
var _local6;
if ((abs(xVel) < 1) && (abs(yVel) < 1)) {
_local6 = round(rando());
} else {
_local6 = round(rando() * 3);
}
if (!_local6) {
var _local5 = (rando() * 800) - 400;
if ((_local5 < 150) && (_local5 > 0)) {
_local5 = (rando() * 100) + 150;
} else if ((_local5 > -150) && (_local5 <= 0)) {
_local5 = (rando() * -100) - 150;
}
var _local4 = (rando() * 800) - 400;
if ((_local4 < 150) && (_local4 > 0)) {
_local4 = (rando() * 100) + 150;
} else if ((_local4 > -150) && (_local4 <= 0)) {
_local4 = (rando() * -100) - 150;
}
_local9 = _local9 + _local5;
_local8 = _local8 + _local4;
}
if (_local6 != 1) {
var _local11 = _local9 - objects[w].x;
var _local10 = _local8 - objects[w].y;
objects[w].xSpd = (_local11 / _local7) / 25;
objects[w].ySpd = (_local10 / _local7) / 25;
if ((_local6 == 3) && (pMatches > 1)) {
objects[w].home = _local7 * 25;
} else {
objects[w].home = 0;
}
} else {
objects[w].xSpd = round((rando() * 15) + 10);
objects[w].ySpd = round((rando() * 15) + 10);
}
objects[w].dis = astsDisp[round(rando() * (astsDisp.length - 1))];
objects[w].rot = (rando() * 16) - 8;
if ((objects[w].rot < 0) && (objects[w].rot > -2)) {
objects[w].rot = -2;
} else if ((objects[w].rot > 0) && (objects[w].rot < 2)) {
objects[w].rot = 2;
}
switch (objects[w].dis) {
case 4 :
objects[w].sW = (objects[w].sH = 110);
break;
case 5 :
objects[w].sW = (objects[w].sH = 130);
}
objects[w].act = true;
objects[w].used = false;
objects[w].decel = 1;
trace("New asteroid created. Aiming method: " + _local6);
}
function addAst() {
if (asts.length > 0) {
astPos(asts[0]);
asts.splice(0, 1);
}
}
function manGame() {
gameTim++;
if (!paus) {
if (Key.isDown(37)) {
ship._rotation = ship._rotation - 4;
} else if (Key.isDown(39)) {
ship._rotation = ship._rotation + 4;
}
if (aRotVel) {
ship._rotation = ship._rotation + aRotVel;
if ((aRotVel > 0) && ((aRotVel - 0.2) > 0)) {
aRotVel = aRotVel - 0.2;
} else if ((aRotVel < 0) && ((aRotVel + 0.2) < 0)) {
aRotVel = aRotVel + 0.2;
} else {
aRotVel = 0;
}
}
var xTVal;
var yTVal;
var totVal;
var aKey = "";
if (Key.isDown(38)) {
aKey = "up";
} else if (Key.isDown(40)) {
aKey = "down";
}
if ((aKey != "") && (!((aKey == "down") && (hsFuel <= 0)))) {
if (aKey == "up") {
if ((flameMode == 0) || (flameMode == 2)) {
if (ship.flames._alpha > 0) {
ship.flames._alpha = ship.flames._alpha - 10;
} else {
flameMode = 1;
ship.flames._alpha = 100;
ship.flames.gotoAndPlay("flIn");
}
}
if ((flameMode == 1) && (ship.flames._alpha < 100)) {
ship.flames._alpha = ship.flames._alpha + 7;
}
vel = 22;
} else if ((aKey == "down") && (hsFuel > 0)) {
hsFuel = hsFuel - hsFuelU;
if ((flameMode == 0) || (flameMode == 1)) {
if (ship.flames._alpha > 0) {
ship.flames._alpha = ship.flames._alpha - 10;
} else {
flameMode = 2;
ship.flames._alpha = 100;
ship.flames.gotoAndPlay("flIn2");
}
}
if ((flameMode == 2) && (ship.flames._alpha < 100)) {
ship.flames._alpha = ship.flames._alpha + 7;
}
vel = 88;
}
if (((ship._rotation == 0) || (ship._rotation == 180)) || (ship._rotation == -180)) {
trgXVel = vel;
trgYVel = 0;
} else if ((ship._rotation == 90) || (ship._rotation == -90)) {
trgXVel = 0;
trgYVel = vel;
} else {
trgYVel = vel * abs(sin(ship._rotation * (pi / 180)));
trgXVel = sqrt((vel * vel) - (trgYVel * trgYVel));
}
if (ship._rotation < 0) {
trgYVel = trgYVel * -1;
}
if ((ship._rotation < -90) || (ship._rotation > 90)) {
trgXVel = trgXVel * -1;
}
acl = 30;
} else {
trgXVel = 0;
trgYVel = 0;
acl = 75;
flameMode = 0;
if (ship.flames._alpha > 0) {
ship.flames._alpha = ship.flames._alpha - 10;
}
}
xVel = xVel + ((trgXVel - xVel) / acl);
yVel = yVel + ((trgYVel - yVel) / acl);
mvSpace._x = mvSpace._x - xVel;
mvSpace._y = mvSpace._y - yVel;
scrnX = scrnX + xVel;
scrnY = scrnY + yVel;
while (((scrnX + ship._x) - 30) <= 400) {
mvSpace._x = mvSpace._x - 2;
scrnX = scrnX + 2;
}
while (((scrnX + ship._x) + 30) >= 19600) {
mvSpace._x = mvSpace._x + 2;
scrnX = scrnX - 2;
}
while (((scrnY + ship._y) - 30) <= 400) {
mvSpace._y = mvSpace._y - 2;
scrnY = scrnY + 2;
}
while (((scrnY + ship._y) + 30) >= 19600) {
mvSpace._y = mvSpace._y + 2;
scrnY = scrnY - 2;
}
var sxMod = 0;
var syMod = 0;
if (mvSpace._x < -1000) {
mvSpace._x = mvSpace._x + 1000;
sxMod = 1000;
} else if (mvSpace._x > 1000) {
mvSpace._x = mvSpace._x - 1000;
sxMod = -1000;
} else if (mvSpace._y < -1000) {
mvSpace._y = mvSpace._y + 1000;
syMod = 1000;
} else if (mvSpace._y > 1000) {
mvSpace._y = mvSpace._y - 1000;
syMod = -1000;
}
var i = 0;
while (i < 20) {
with (mvSpace["s" + i]) {
_x = _x - sxMod;
_y = _y - syMod;
if ((_x + _parent._x) > 800) {
_x = _x - 1000;
bNum = bNum - 5;
this.newSector(i);
} else if ((_x + _parent._x) < -200) {
_x = _x + 1000;
bNum = bNum + 5;
this.newSector(i);
} else if ((_y + _parent._y) > 600) {
_y = _y - 800;
bNum = bNum - (spaceRow * 4);
this.newSector(i);
} else if ((_y + _parent._y) < -200) {
_y = _y + 800;
bNum = bNum + (spaceRow * 4);
this.newSector(i);
}
}
i++;
}
lowDist = 999999999 /* 0x3B9AC9FF */;
var i = 0;
while (i < objects.length) {
if (objects[i].act != false) {
if (((((objOn.zeroContains(i) == -1) && (scrnX < (objects[i].x + objects[i].sW))) && ((scrnX + 800) > (objects[i].x - objects[i].sW))) && (scrnY < (objects[i].y + objects[i].sH))) && ((scrnY + 600) > (objects[i].y - objects[i].sH))) {
var f = -1;
var k = 0;
var i2 = 0;
while (ob["o" + i2] != undefined) {
if (ob["o" + i2].o == false) {
f = i2;
break;
}
k++;
i2++;
}
if (f == -1) {
f = k;
ob.attachMovie("mcObject", "o" + f, ob.getNextHighestDepth());
}
ob["o" + f]._rotation = 0;
ob["o" + f].o = true;
ob["o" + f].i = i;
trace("Object added! " + ob["o" + f].i);
ob["o" + f].gotoAndStop(objects[i].dis);
ob["o" + f]._x = -600;
if ((!objects[i].tract) && (!objects[i].spdDam)) {
ob["o" + f].chk.gotoAndStop(2);
}
objOn.push(new Array(i, f));
if ((pOver >= 0) && (tOn)) {
ob["o" + pOver].swapDepths(ob.getNextHighestDepth());
}
} else if (((((mMDots.Contains(i) == -1) && (objects[i].x > ((ship._x + scrnX) - mMRad))) && (objects[i].x < ((ship._x + scrnX) + mMRad))) && (objects[i].y > ((ship._y + scrnY) - mMRad))) && (objects[i].y < ((ship._y + scrnY) + mMRad))) {
var f = -1;
var k = 0;
var i2 = 0;
while (inter.mm["d" + i2] != undefined) {
if (!inter.mm["d" + i2].o) {
f = i2;
break;
}
k++;
i2++;
}
if (f == -1) {
f = k;
inter.mm.attachMovie("mcMMDot", "d" + f, inter.mm.getNextHighestDepth());
}
inter.mm["d" + f].o = true;
inter.mm["d" + f].i = i;
if (!objects[i].spdDam) {
if (objects[i].tract) {
inter.mm["d" + f].gotoAndStop(2);
} else {
inter.mm["d" + f].gotoAndStop(3);
}
} else {
inter.mm["d" + f].gotoAndStop(4);
}
mMDots[f] = i;
}
if (objects[i].pXSpd && (!((pOverN == i) && (tOn)))) {
if ((objects[i].xSpd < objects[i].pXSpd) && ((objects[i].xSpd + objects[i].pAccl) < objects[i].pXSpd)) {
objects[i].xSpd = objects[i].xSpd + objects[i].pAccl;
} else if (objects[i].xSpd < objects[i].pXSpd) {
objects[i].xSpd = objects[i].pXSpd;
} else if ((objects[i].xSpd > objects[i].pXSpd) && ((objects[i].xSpd - objects[i].pAccl) > objects[i].pXSpd)) {
objects[i].xSpd = objects[i].xSpd - objects[i].pAccl;
} else if (objects[i].xSpd > objects[i].pXSpd) {
objects[i].xSpd = objects[i].pXSpd;
}
if ((objects[i].ySpd < objects[i].pYSpd) && ((objects[i].ySpd + objects[i].pAccl) < objects[i].pYSpd)) {
objects[i].ySpd = objects[i].ySpd + objects[i].pAccl;
} else if (objects[i].ySpd < objects[i].pYSpd) {
objects[i].ySpd = objects[i].pYSpd;
} else if ((objects[i].ySpd > objects[i].pYSpd) && ((objects[i].ySpd - objects[i].pAccl) > objects[i].pYSpd)) {
objects[i].ySpd = objects[i].ySpd - objects[i].pAccl;
} else if (objects[i].ySpd > objects[i].pYSpd) {
objects[i].ySpd = objects[i].pYSpd;
}
objects[i].decel = 1;
}
if (objects[i].xSpd) {
objects[i].x = objects[i].x + objects[i].xSpd;
objects[i].y = objects[i].y + objects[i].ySpd;
objects[i].xSpd = objects[i].xSpd * objects[i].decel;
objects[i].ySpd = objects[i].ySpd * objects[i].decel;
if (!objects[i].spdDam) {
if (objects[i].pXSpd && (!((pOverN == i) && (tOn)))) {
if (((objects[i].x <= 400) && (objects[i].pXSpd < 0)) || ((objects[i].x >= 19600) && (objects[i].pXSpd > 0))) {
objects[i].pXSpd = objects[i].pXSpd * -1;
}
if (((objects[i].y <= 400) && (objects[i].pYSpd < 0)) || ((objects[i].y >= 19600) && (objects[i].pYSpd > 0))) {
objects[i].pYSpd = objects[i].pYSpd * -1;
}
} else {
while (objects[i].x <= 400) {
objects[i].x = 401;
}
while (objects[i].x >= 19600) {
objects[i].x = 19599;
}
while (objects[i].y <= 400) {
objects[i].y = 401;
}
while (objects[i].y >= 19600) {
objects[i].y = 19599;
}
}
} else if ((abs(objects[i].x - (scrnX + ship._x)) > (mMRad + 1500)) || (abs(objects[i].y - (scrnY + ship._y)) > (mMRad + 1500))) {
astPos(i);
} else if (objects[i].home) {
if ((abs(objects[i].x - (scrnX + ship._x)) > 1200) || (abs(objects[i].y - (scrnY + ship._y)) > 1200)) {
if (objects[i].home > 15) {
objects[i].home--;
}
futTim = objects[i].home;
var shX = ((scrnX + ship._x) + (xVel * futTim));
var shY = ((scrnY + ship._y) + (yVel * futTim));
var xDiff = (shX - objects[i].x);
var yDiff = (shY - objects[i].y);
objects[i].xSpd = xDiff / futTim;
objects[i].ySpd = yDiff / futTim;
} else {
objects[i].home = 0;
}
}
if (objects[i].tract && (!objects[i].invalid)) {
var i2 = 0;
while (i2 < objects.length) {
if (((objects[i2].tract && (!objects[i2].invalid)) && (i != i2)) && ((pOverN == i) || (pOverN == i2))) {
if (((((objects[i2].x < (objects[i].x + objects[i].sW)) && (objects[i2].x > (objects[i].x - objects[i].sW))) && (objects[i2].y < (objects[i].y + objects[i].sH))) && (objects[i2].y > (objects[i].y - objects[i].sH))) || ((((objects[i].x < (objects[i2].x + objects[i2].sW)) && (objects[i].x > (objects[i2].x - objects[i2].sW))) && (objects[i].y < (objects[i2].y + objects[i2].sH))) && (objects[i].y > (objects[i2].y - objects[i2].sH)))) {
objects[i].tract = (objects[i2].tract = false);
objects[i].decel = (objects[i2].decel = 0.8);
inter.mm["d" + mMDots.Contains(i)].gotoAndStop(3);
inter.mm["d" + mMDots.Contains(i2)].gotoAndStop(3);
ob["o" + objOn[objOn.zeroContains(i)][1]].chk.gotoAndStop(2);
ob["o" + objOn[objOn.zeroContains(i2)][1]].chk.gotoAndStop(2);
tOn = false;
pOver = -1;
questInt = setInterval(this, "question", 500, i, i2);
transit = true;
questP1 = i;
questP2 = i2;
}
}
i2++;
}
}
if ((abs(objects[i].xSpd) < 0.1) && (abs(objects[i].ySpd) < 0.1)) {
objects[i].xSpd = 0;
}
}
if (objects[i].tract && (pOverN != i)) {
var xDist = abs((scrnX + ship._x) - objects[i].x);
var yDist = abs((scrnY + ship._y) - objects[i].y);
var totDist = sqrt((xDist * xDist) + (yDist * yDist));
if (totDist < lowDist) {
lowDist = totDist;
lowP = i;
}
}
} else if ((objects[i].spdDam != true) && (pMatches >= objects[i].matchReq)) {
if ((((objects[i].x < ((ship._x + scrnX) - mMRad)) || (objects[i].x > ((ship._x + scrnX) + mMRad))) || (objects[i].y < ((ship._y + scrnY) - mMRad))) || (objects[i].y > ((ship._y + scrnY) + mMRad))) {
objects[i].act = true;
trace(("Hidden '" + objects[i].name) + "' enabled!");
}
}
i++;
}
var numNT = 0;
planetAdv = -1;
var i = 0;
while (i < objOn.length) {
var j = objOn[i][0];
var f = objOn[i][1];
if ((pOver != f) && ((((scrnX > (objects[j].x + objects[j].sW)) || ((scrnX + 800) < (objects[j].x - objects[j].sW))) || (scrnY > (objects[j].y + objects[j].sH))) || ((scrnY + 600) < (objects[j].y - objects[j].sH)))) {
ob["o" + f].gotoAndStop("clear");
ob["o" + f].o = false;
objOn.splice(i, 1);
if (objects[j].used) {
var p = mMDots.Contains(j);
inter.mm["d" + p].gotoAndStop(1);
inter.mm["d" + p].o = false;
mMDots[p] = -1;
astPos(j);
} else if (objects[j].pXSpd && (!objects[j].invalid)) {
objects[j].invalid = true;
}
} else {
if ((objects[j].invalid && (tOn)) && (pOverN != j)) {
objects[j].invalid = false;
}
ob["o" + f]._x = objects[j].x - scrnX;
ob["o" + f]._y = objects[j].y - scrnY;
if (((((!objects[j].used) && (ship._x > (ob["o" + f]._x - objects[j].sW))) && (ship._x < (ob["o" + f]._x + objects[j].sW))) && (ship._y > (ob["o" + f]._y - objects[j].sH))) && (ship._y < (ob["o" + f]._y + objects[j].sH))) {
if (objects[j].spdDam) {
score = score - 12;
asHit++;
xVel = objects[j].xSpd * 2;
yVel = objects[j].ySpd * 2;
aRotVel = objects[j].rot * 3;
sfxBoom2.start();
objects[j].decel = 0.8;
objects[j].used = true;
if (tOn) {
tOn = false;
pOver = -1;
tractOffTim = 50;
}
} else {
inter.pPic.gotoAndStop(objects[j].dis);
inter.pName.text = objects[j].name;
inter.pNotes.text = objects[j].notes;
closePoint = Math.atan2(objects[lowP].y - (scrnY + ship._y), objects[lowP].x - (scrnX + ship._x)) * (180 / pi);
if ((objects[j].tract == false) && (!transit)) {
if (inter.says._currentframe == 1) {
inter.says.gotoAndPlay("in");
}
planetAdv = j;
}
if (!tOn) {
pOver = f;
pOverN = j;
}
}
} else {
numNT++;
}
if (objects[j].rot) {
ob["o" + f]._rotation = ob["o" + f]._rotation + objects[j].rot;
}
}
i++;
}
if (numNT == objOn.length) {
if (!tOn) {
pOver = -1;
inter.pPic.gotoAndStop(1);
inter.pName.text = "";
inter.pNotes.text = "";
} else {
inter.pPic.gotoAndStop(objects[ob["o" + pOver].i].dis);
inter.pName.text = objects[ob["o" + pOver].i].name;
inter.pNotes.text = objects[ob["o" + pOver].i].notes;
}
}
score = score - 0.0133333;
inter.score.text = "Score: " + round(score);
inter.loc.text = ((("Location: (" + round(scrnX + ship._x)) + ",") + round(scrnY + ship._y)) + ")";
inter.gSpd.text = ("Game Speed: " + _parent.curFPS) + "/25 FPS";
if ((planetAdv < 0) && (inter.says.saysIn)) {
inter.says.gotoAndPlay("out");
}
inter.hsMask._xscale = (hsFuel / 100) * 100;
inter.mm.arr._rotation = ship._rotation;
var i = 0;
while (i < mMDots.length) {
if (inter.mm["d" + i].o) {
inter.mm["d" + i]._x = (objects[mMDots[i]].x - (scrnX + ship._x)) / (mMRad / 85);
inter.mm["d" + i]._y = (objects[mMDots[i]].y - (scrnY + ship._y)) / (mMRad / 85);
var c = inter.mm["d" + i].i;
if ((((objects[c].x < ((ship._x + scrnX) - mMRad)) || (objects[c].x > ((ship._x + scrnX) + mMRad))) || (objects[c].y < ((ship._y + scrnY) - mMRad))) || (objects[c].y > ((ship._y + scrnY) + mMRad))) {
inter.mm["d" + i].o = false;
inter.mm["d" + i].gotoAndStop(1);
mMDots[i] = -1;
}
}
i++;
}
if ((Key.isDown(32) && (pOver >= 0)) && (tractOffTim <= 0)) {
if ((!tOn) && (objects[ob["o" + pOver].i].tract)) {
ship.beam._alpha = 100;
ship.beam.gotoAndStop(2);
tOn = true;
objects[ob["o" + pOver].i].decel = 0.98;
objects[ob["o" + pOver].i].invalid = false;
ob["o" + pOver].swapDepths(ob.getNextHighestDepth());
divi = 4.5;
}
if (tOn) {
ship.beam._rotation = (Math.atan2(objects[pOverN].y - (scrnY + ship._y), objects[pOverN].x - (scrnX + ship._x)) * (180 / pi)) - ship._rotation;
var ptDiff = sqrt(pow(abs(ship._x - ob["o" + pOver]._x), 2) + pow(abs(ship._y - ob["o" + pOver]._y), 2));
ship.beam.beam.m._width = (ship.beam.beam.m2._width = ptDiff);
if (ship.beam.beam.m._width > 575) {
ship.beam.beam.m._width = (ship.beam.beam.m2._width = 575);
}
ship.beam.beam.m._x = (ship.beam.beam.m2._x = (ship.beam.beam.l._x = (ship.beam.beam.b._x = ship.beam.beam.m._width / 2)));
if (ship.beam.beam.m._x > 300) {
ship.beam.beam.m._x = (ship.beam.beam.m2._x = 300);
}
ship.beam.beam.sparkly._x = (ship.beam.beam.m._x + (ship.beam.beam.m._width / 2)) - 10;
var div = ((-0.02833333 * ptDiff) + 18);
if (div < 1) {
div = 1;
}
objects[ob["o" + pOver].i].xSpd = (ship._x - ob["o" + pOver]._x) / div;
objects[ob["o" + pOver].i].ySpd = (ship._y - ob["o" + pOver]._y) / div;
}
} else if (tOn) {
tOn = false;
} else if (ship.beam._alpha > 0) {
ship.beam._alpha = ship.beam._alpha - 10;
if (ship.beam._alpha <= 0) {
ship.beam.gotoAndStop(2);
}
} else if (tractOffTim) {
tractOffTim--;
}
if (!_parent.instsDone) {
if ((pMatches > 0) && (instaTexts > 6)) {
_parent.instsDone = true;
inter.instText.text = "";
} else {
if (instaTexts != 6) {
if (((objects[pOverN].tract != true) || (pOver < 0)) && (!tOn)) {
inter.instText.text = "Fly over an unsolved planet! (Yellow dot on mini-map.)";
} else if ((objects[pOverN].tract == true) && (!tOn)) {
inter.instText.text = "HOLD SPACE to use your tractor beam!";
if (instaTexts == 1) {
instaTexts++;
}
} else if (tOn) {
inter.instText.text = "Pull this planet into another unsolved planet!";
if (instaTexts <= 3) {
instaTexts = 4;
lastInsta = gameTim;
}
}
} else {
inter.instText.text = "Great! Now go solve some more!";
}
var instad = false;
if ((instaTexts == 0) && (gameTim > (lastInsta + 40))) {
inter.quickInst.gotoAndStop("inst1");
instad = true;
} else if (instaTexts == 2) {
inter.quickInst.gotoAndStop("inst2");
instad = true;
} else if ((instaTexts == 4) && (gameTim > (lastInsta + 20))) {
if (tOn) {
inter.quickInst.gotoAndStop("inst3");
instad = true;
} else {
instaTexts = 3;
}
} else if ((instaTexts == 6) && (gameTim > (lastInsta + 85))) {
inter.quickInst.gotoAndStop("inst4");
instad = true;
}
if (instad) {
paus = true;
inter.quit.enabled = false;
inter.bPause.enabled = false;
lastInsta = gameTim;
instaTexts++;
sfxClick.start();
}
}
}
if (pMatches >= 7) {
inter.instText.text = "Try flying over solved planets for directions!";
hsFuel = hsFuel + 0.01;
}
}
}
function newSector(i) {
with (mvSpace["s" + i]) {
gotoAndStop(this.space[bNum]);
if ((bNum < (spaceRow + (spaceRow - 2))) && (bNum > (spaceRow + 1))) {
laserB.gotoAndStop("bottom");
} else if ((bNum < ((spaceRow * (spaceRow - 1)) - 2)) && (bNum > ((spaceRow * (spaceRow - 1)) - (spaceRow - 1)))) {
laserB.gotoAndStop("top");
} else if ((((bNum % spaceRow) == 1) && (bNum < (spaceRow * (spaceRow - 2)))) && (bNum > (spaceRow * 2))) {
laserB.gotoAndStop("right");
} else if ((((bNum % spaceRow) == (spaceRow - 2)) && (bNum < (spaceRow * (spaceRow - 2)))) && (bNum > (spaceRow * 2))) {
laserB.gotoAndStop("left");
} else {
laserB.gotoAndStop("clear");
}
}
}
function question(i, i2) {
clearInterval(questInt);
transit = false;
paus = true;
inter.quest.gotoAndPlay("questIn");
questReqs = [];
var _local3 = true;
var _local2 = 0;
if (((usedQReqs.length + floor(pMatches / 2)) + 1) > (questRS.length - 2)) {
_local3 = false;
i = 0;
while (i < (questRS.length - 2)) {
if (usedQReqs.Contains(i) <= -1) {
questReqs.push(i);
usedQReqs.push(i);
_local2++;
}
i++;
}
if (_local2 < (floor(pMatches / 2) + 1)) {
_local3 = true;
usedQReqs = [];
usedQReqs = questReqs.slice();
}
}
if (_local3) {
while (_local2 <= floor(pMatches / 2)) {
i = 0;
do {
i = round(rando() * (questRS.length - 3));
} while (usedQReqs.Contains(i) > -1);
questReqs.push(i);
usedQReqs.push(i);
_local2++;
}
}
pMatches++;
inter.bPause.but.enabled = false;
inter.quit.enabled = false;
}
abs = Math.abs;
sin = Math.sin;
pi = Math.PI;
sqrt = Math.sqrt;
pow = Math.pow;
round = Math.round;
floor = Math.floor;
rando = Math.random;
var paus = false;
var trgXVel = 0;
var trgYVel = 0;
var xVel = 0;
var yVel = 0;
var aRotVel = 0;
var divi = 4.5;
var acl = 0.2;
var vel = 22;
var flameMode = 0;
var hsFuel = 100;
var hsFuelU = 1;
var pOver = -1;
var pOverN = -1;
var tOn = false;
var tractOffTim = 0;
var score = 100;
var asHit = 0;
var gameTim = 0;
var qAnsd = 0;
var qCorFirst = 0;
var questInt = 0;
var questP1 = -1;
var questP2 = -1;
var questReqs = new Array();
var questTmeAllw = 25000;
var usedQReqs = new Array();
var pMatches = 0;
var mMDots = new Array();
var mMRad = 4000;
var instaTexts = 0;
var lastInsta = 0;
var lowDist;
var lowP;
var planetAdv;
var closePoint;
var transit;
var spaceRow = 100;
var space = new Array();
var i = 0;
while (i < 10000) {
space[i] = Math.round((rando() * (mvSpace.s0._totalframes - 2)) + 2);
i++;
}
var i = 0;
while (i < 20) {
mvSpace["s" + i].bNum = ((((100 * floor(i / 5)) + (i % 5)) + (spaceRow / 2)) - 3) + (100 * ((spaceRow / 2) - 2));
mvSpace["s" + i].cacheAsBitmap = true;
mvSpace["s" + i].gotoAndStop(space[mvSpace["s" + i].bNum]);
i++;
}
var scrnX = ((mvSpace.s6.bNum % spaceRow) * 200);
var scrnY = (((mvSpace.s6.bNum - (mvSpace.s6.bNum % spaceRow)) / spaceRow) * 200);
var objOn = new Array();
var objects = new Array();
objects[0] = new Array();
objects[0].name = "Planet Wigg";
objects[0].notes = "Your home; Can't be tractor beamed!";
objects[0].x = scrnX + 400;
objects[0].y = scrnY + 300;
objects[0].sW = 200;
objects[0].sH = 175;
objects[0].dis = 2;
objects[0].tract = false;
objects[0].ppl = ["Mr. Wogs::m", "Ms. Ogaki::f"];
objects[1] = new Array();
objects[1].name = "Planet Hydra";
objects[1].notes = "A planet made almost completely of water.";
objects[1].x = 8500;
objects[1].y = 9000;
objects[1].sW = 130;
objects[1].sH = 115;
objects[1].dis = 3;
objects[1].tract = true;
objects[1].ppl = ["Mrs. Kelp::f::15::3::7::1::2::2", "Mr. Pineapple::m::6::1::3::5::2::3"];
objects[1].colRed = 47;
objects[1].colGreen = 126;
objects[1].colBlue = 157;
objects[2] = new Array();
objects[2].name = "Asteroid";
objects[2].notes = "CRASH!";
objects[2].decel = 1;
objects[2].spdDam = true;
objects[2].act = false;
objects[3] = new Array();
objects[3].name = "Asteroid";
objects[3].notes = "CRASH!";
objects[3].decel = 1;
objects[3].spdDam = true;
objects[3].act = false;
objects[4] = new Array();
objects[4].name = "Asteroid";
objects[4].notes = "CRASH!";
objects[4].decel = 1;
objects[4].spdDam = true;
objects[4].act = false;
objects[5] = new Array();
objects[5].name = "Planet Vinyar";
objects[5].notes = "The forest planet.";
objects[5].x = 3000;
objects[5].y = 16300;
objects[5].sW = 130;
objects[5].sH = 115;
objects[5].dis = 6;
objects[5].tract = true;
objects[5].ppl = ["Fern::f::17::4::2::1::8::3", "Mr. Weed::m::6::2::6::6::1::1"];
objects[5].colRed = 0;
objects[5].colGreen = 153;
objects[5].colBlue = 0;
objects[6] = new Array();
objects[6].name = "Planet Opal";
objects[6].notes = "This planet's gases makes it shine!";
objects[6].x = 18000;
objects[6].y = 2300;
objects[6].sW = 120;
objects[6].sH = 105;
objects[6].dis = 7;
objects[6].tract = true;
objects[6].ppl = ["Graphin::m::3::6::2::2::9::1", "Mrs. Glow::f::17::7::1::1::5::2"];
objects[6].colRed = 225;
objects[6].colGreen = 225;
objects[6].colBlue = 225;
objects[7] = new Array();
objects[7].name = "Planet Dust";
objects[7].notes = "This planet is messier than your room!";
objects[7].x = 14800;
objects[7].y = 14500;
objects[7].sW = 135;
objects[7].sH = 115;
objects[7].dis = 8;
objects[7].tract = true;
objects[7].ppl = ["Mr. Mud::m::5::9::5::1::1::3", "Mr. Puddle::m::1::8::9::2::4::4"];
objects[7].colRed = 51;
objects[7].colGreen = 0;
objects[7].colBlue = 0;
objects[8] = new Array();
objects[8].name = "Planet Monarch";
objects[8].notes = "A very large, very rich planet.";
objects[8].x = 2000;
objects[8].y = 1000;
objects[8].sW = 170;
objects[8].sH = 145;
objects[8].dis = 9;
objects[8].tract = true;
objects[8].ppl = ["Queen Remdi::f::2::4::2::3::7::2", "Magister Illan::m::11::1::3::7::9::2"];
objects[8].colRed = 69;
objects[8].colGreen = 194;
objects[8].colBlue = 154;
objects[9] = new Array();
objects[9].name = "Planet Swift";
objects[9].notes = "A speedy planet that's always on the move.";
objects[9].x = 6000;
objects[9].y = 7500;
objects[9].sW = 148;
objects[9].sH = 124;
objects[9].dis = 10;
objects[9].tract = true;
objects[9].xSpd = 0;
objects[9].ySpd = 0;
objects[9].pXSpd = 20;
objects[9].pYSpd = 15;
objects[9].pAccl = 0.2;
objects[9].ppl = ["Hermes::m::16::3::7::5::5::3", "Atalanta::f::10::7::1::1::6::2"];
objects[9].invalid = true;
objects[9].colRed = 255;
objects[9].colGreen = 153;
objects[9].colBlue = 0;
objects[10] = new Array();
objects[10].name = "Planet Granit";
objects[10].notes = "Granit is cold, hard rock. Its name is a rhyme!";
objects[10].x = 19100;
objects[10].y = 9000;
objects[10].sW = 110;
objects[10].sH = 130;
objects[10].dis = 11;
objects[10].tract = true;
objects[10].ppl = ["Sandy::f::12::5::4::1::8::3", "Mr. Stone::m::13::6::6::4::3::1"];
objects[10].colRed = 102;
objects[10].colGreen = 102;
objects[10].colBlue = 102;
objects[11] = new Array();
objects[11].name = "Planet Shadow";
objects[11].notes = "This deformed planet is covered by clouds.";
objects[11].x = 2100;
objects[11].y = 19000;
objects[11].sW = 132;
objects[11].sH = 110;
objects[11].dis = 12;
objects[11].tract = true;
objects[11].xSpd = 0;
objects[11].ySpd = 0;
objects[11].pXSpd = 11;
objects[11].pYSpd = -6;
objects[11].pAccl = 0.2;
objects[11].ppl = ["Mr. Dark::m::8::1::9::6::9::3", "Narcissa::f::10::7::2::1::7::2"];
objects[11].invalid = true;
objects[11].act = false;
objects[11].matchReq = 1;
objects[11].colRed = 30;
objects[11].colGreen = 30;
objects[11].colBlue = 30;
objects[12] = new Array();
objects[12].name = "Planet Royalo";
objects[12].notes = "An empire on a purple planet!";
objects[12].x = 12100;
objects[12].y = 12000;
objects[12].sW = 156;
objects[12].sH = 133;
objects[12].dis = 13;
objects[12].tract = true;
objects[12].xSpd = 0;
objects[12].ySpd = 0;
objects[12].pXSpd = -11;
objects[12].pYSpd = 13;
objects[12].pAccl = 0.25;
objects[12].ppl = ["Pompeia::f::15::4::7::3::8::2", "Caesar::m::7::3::4::7::9::1"];
objects[12].invalid = true;
objects[12].act = false;
objects[12].matchReq = 1;
objects[12].colRed = 204;
objects[12].colGreen = 102;
objects[12].colBlue = 255;
objects[13] = new Array();
objects[13].name = "Planet Blu";
objects[13].notes = "A light, fast, and airy world.";
objects[13].x = -3000;
objects[13].y = 5000;
objects[13].sW = 112;
objects[13].sH = 104;
objects[13].dis = 14;
objects[13].tract = true;
objects[13].xSpd = 0;
objects[13].ySpd = 0;
objects[13].pXSpd = 19;
objects[13].pYSpd = 2;
objects[13].pAccl = 0.3;
objects[13].ppl = ["Mr. Dodge::m::9::1::9::1::1::4", "Mrs. Coulter::f::17::5::5::1::2::3"];
objects[13].invalid = true;
objects[13].act = false;
objects[13].matchReq = 2;
objects[13].colRed = 116;
objects[13].colGreen = 241;
objects[13].colBlue = 216;
objects[14] = new Array();
objects[14].name = "Planet Vert";
objects[14].notes = "This planet glows with health - like brocolli.";
objects[14].x = 11000;
objects[14].y = 21000;
objects[14].sW = 140;
objects[14].sH = 130;
objects[14].dis = 15;
objects[14].tract = true;
objects[14].xSpd = 0;
objects[14].ySpd = 0;
objects[14].pXSpd = -7;
objects[14].pYSpd = -10;
objects[14].pAccl = 0.15;
objects[14].ppl = ["Mrs. Sprout::f::6::7::5::1::2::2", "Mr. Green::m::6::9::8::4::4::3"];
objects[14].invalid = true;
objects[14].act = false;
objects[14].matchReq = 2;
objects[14].colRed = 130;
objects[14].colGreen = 255;
objects[14].colBlue = 50;
objects[15] = new Array();
objects[15].name = "Planet Thermo";
objects[15].notes = "The seasons here are warm, hot, and warm.";
objects[15].x = 21000;
objects[15].y = 1000;
objects[15].sW = 140;
objects[15].sH = 125;
objects[15].dis = 16;
objects[15].tract = true;
objects[15].xSpd = 0;
objects[15].ySpd = 0;
objects[15].pXSpd = -11;
objects[15].pYSpd = 5;
objects[15].pAccl = 0.4;
objects[15].ppl = ["Mr. Mercure::m::3::3::4::1::1::1", "Sir Faren::m::11::7::2::2::9::3"];
objects[15].invalid = true;
objects[15].act = false;
objects[15].matchReq = 3;
objects[15].colRed = 203;
objects[15].colGreen = 100;
objects[15].colBlue = 100;
objects[16] = new Array();
objects[16].name = "Planet D'Or";
objects[16].notes = "A planet made of gold!";
objects[16].x = 8800;
objects[16].y = 2500;
objects[16].sW = 100;
objects[16].sH = 95;
objects[16].dis = 17;
objects[16].tract = true;
objects[16].ppl = ["Mrs. Wealthy::f::17::1::1::1::6::2", "Mr. Money::m::1::1::7::1::9::2"];
objects[16].colRed = 227;
objects[16].colGreen = 182;
objects[16].colBlue = 2;
objects[17] = new Array();
objects[17].name = "Planet Airium";
objects[17].notes = "A fairly dull - but nice - planet.";
objects[17].x = 9600;
objects[17].y = 17800;
objects[17].sW = 148;
objects[17].sH = 132;
objects[17].dis = 18;
objects[17].tract = true;
objects[17].ppl = ["Mr. Birch::m::14::3::9::1::4::3", "Ms. Monochrome::f::15::5::4::1::8::3"];
objects[17].colRed = 165;
objects[17].colGreen = 163;
objects[17].colBlue = 206;
objects[18] = new Array();
objects[18].name = "Planet Rose";
objects[18].notes = "Pink - the toughest known colour.";
objects[18].x = 10000;
objects[18].y = 10000;
objects[18].sW = 134;
objects[18].sH = 122;
objects[18].dis = 19;
objects[18].tract = true;
objects[18].xSpd = 0;
objects[18].ySpd = 0;
objects[18].pXSpd = -15;
objects[18].pYSpd = -15;
objects[18].pAccl = 0.5;
objects[18].ppl = ["Mrs. Doily::f::12::2::1::3::6::2", "Mr. Straun::m::16::3::6::4::1::1"];
objects[18].invalid = true;
objects[18].act = false;
objects[18].matchReq = 3;
objects[18].colRed = 255;
objects[18].colGreen = 153;
objects[18].colBlue = 204;
objects[19] = new Array();
objects[19].name = "Planet Neptune";
objects[19].notes = "The furthest planet from Earth's Sun.";
objects[19].x = 0;
objects[19].y = -1000;
objects[19].sW = 160;
objects[19].sH = 140;
objects[19].dis = 20;
objects[19].tract = true;
objects[19].xSpd = 0;
objects[19].ySpd = 0;
objects[19].pXSpd = 13;
objects[19].pYSpd = 21;
objects[19].pAccl = 0.3;
objects[19].ppl = ["Poseidon::m::7::8::7::7::3::4", "Amphitrite::f::2::4::2::3::9::2"];
objects[19].invalid = true;
objects[19].act = false;
objects[19].matchReq = 5;
objects[19].colRed = 51;
objects[19].colGreen = 102;
objects[19].colBlue = 204;
objects[20] = new Array();
objects[20].name = "Planet Saturn";
objects[20].notes = "A giant, ringed planet; 6th from Earth's Sun.";
objects[20].x = 10000;
objects[20].y = 19000;
objects[20].sW = 173;
objects[20].sH = 150;
objects[20].dis = 21;
objects[20].tract = true;
objects[20].xSpd = 0;
objects[20].ySpd = 0;
objects[20].pXSpd = 8;
objects[20].pYSpd = -5;
objects[20].pAccl = 0.4;
objects[20].ppl = ["Rhea::f::12::1::5::1::5::3", "Cronus::m::8::9::8::4::1::1"];
objects[20].invalid = true;
objects[20].act = false;
objects[20].matchReq = 5;
objects[20].colRed = 169;
objects[20].colGreen = 114;
objects[20].colBlue = 78;
objects[21] = new Array();
objects[21].name = "Planet Mars";
objects[21].notes = "The red planet; 4th from Earth's Sun.";
objects[21].x = 10000;
objects[21].y = 19000;
objects[21].sW = 122;
objects[21].sH = 107;
objects[21].dis = 22;
objects[21].tract = true;
objects[21].xSpd = 0;
objects[21].ySpd = 0;
objects[21].pXSpd = -10;
objects[21].pYSpd = 10;
objects[21].pAccl = 0.2;
objects[21].ppl = ["Minerva::f::17::5::1::1::6::3", "Hera::f::10::4::2::1::7::2"];
objects[21].invalid = true;
objects[21].act = false;
objects[21].matchReq = 6;
objects[21].colRed = 107;
objects[21].colGreen = 46;
objects[21].colBlue = 46;
objects[22] = new Array();
objects[22].name = "Planet Earth";
objects[22].notes = "The planet we all know!";
objects[22].x = 10000;
objects[22].y = 1000;
objects[22].sW = 138;
objects[22].sH = 125;
objects[22].dis = 23;
objects[22].tract = true;
objects[22].xSpd = 0;
objects[22].ySpd = 0;
objects[22].pXSpd = 16;
objects[22].pYSpd = 20;
objects[22].pAccl = 0.3;
objects[22].ppl = ["Mr. Fernando::m::16::3::1::5::8::3", "Septenary::m::7::3::2::7::9::2"];
objects[22].invalid = true;
objects[22].act = false;
objects[22].matchReq = 7;
objects[22].colRed = 255;
objects[22].colGreen = 204;
objects[22].colBlue = 153;
objects[23] = new Array();
objects[23].name = "Planet Lilliput";
objects[23].notes = "Only the smallest of Wiggies live on Lilliput.";
objects[23].x = 590;
objects[23].y = 8400;
objects[23].sW = 60;
objects[23].sH = 53;
objects[23].dis = 24;
objects[23].tract = true;
objects[23].xSpd = 0;
objects[23].ySpd = 0;
objects[23].pXSpd = 3;
objects[23].pYSpd = -3;
objects[23].pAccl = 0.1;
objects[23].ppl = ["Little Spinny::f::17::7::1::3::7::2", "Mr. Mini::m::8::9::3::5::4::4"];
objects[23].invalid = true;
objects[23].colRed = 179;
objects[23].colGreen = 179;
objects[23].colBlue = 179;
var asts = [2, 3, 4];
var astsDisp = [4, 5];
var questRS = new Array();
questRS[0] = new Array();
questRS[0].name = "Respectful";
questRS[0].quest = "<b>How can %i1% from %p1% be <font color='#FF9900'>Respectful</font> towards %i2% from %p2%?</b>";
questRS[0].ans = ["By taking off %-s1% hat when %_s1% enters %-s2% house.::", "By arriving on time for a meeting with %s2%.::", "By letting %s2% have %-s2% personal space.::|4|", "By saying %-s1% \"please\" and \"thank you\"s.::", "By saying \"good morning\" to %s2% at the start of the day.::|4|", "By never ignoring %s2%.::"];
questRS[0].def = "Respect is the basic goodness that you show others, either to compliment them or show them that you are a nice person!";
questRS[1] = new Array();
questRS[1].name = "Tolerant";
questRS[1].quest = "<b>How can %i1% from %p1% be <font color='#FF9900'>Tolerant</font> towards %i2% from %p2%?</b>";
questRS[1].ans = ["By accepting %-s2% religion and beliefs.::|0|", "By understanding why %-s2% skin colour is different.::|0|", "By listening to %s2% even though %_s2%'s much younger than %s1%.::|0|", "By befriending %s2%, even though %_s2% speaks a different language.::|0|", "By being nice to %s2%, even though %_s2%'s not as smart.::|0||5|", "By not putting %s2% down, even though %_s2% acts \"weird\".::|0|"];
questRS[1].def = "To be tolerant is to treat all people equally, regardless of age, race, faith or intelligence!";
questRS[2] = new Array();
questRS[2].name = "Cooperative";
questRS[2].quest = "<b>How can %i1% from %p1% <font color='#FF9900'>Cooperate</font> with %i2% from %p2%?</b>";
questRS[2].ans = ["By being a good teammate.::|0|", "By doing a chore that %_s1%'s been politely asked to help with.::|4||0|", "By equally sharing work with %s2%.::|4||0|", "By working with %s2% to get both their assignments done.::|4||0|", "By helping %s2% search a room to quickly find a lost object.::|4||0|"];
questRS[2].def = "To cooperate with somebody is to benefit both them and yourself by sharing goals and working together!";
questRS[3] = new Array();
questRS[3].name = "Courageous";
questRS[3].quest = "<b>How can %i1% from %p1% act <font color='#FF9900'>Courageous</font> while %i2% from %p2% is watching?</b>";
questRS[3].ans = ["By breaking up a physical fight.::", "By standing up to the mean guy who bullies %s2%.::|4|", "By making a speech, even though %_s1%'s afraid of public speaking.::", "By staying calm in a thunderstorm.::", "By removing a frightening spider.::", "By not being afraid of the dark.::"];
questRS[3].def = "Courage is the ability to face danger or challenges without getting scared!";
questRS[4] = new Array();
questRS[4].name = "Generous";
questRS[4].quest = "<b>How can %i1% from %p1% be <font color='#FF9900'>Generous</font> to %i2% from %p2%?</b>";
questRS[4].ans = ["By getting %s2% a holiday present.::|0|", "By helping %s2% to fix %-s2% roof.::|0||2|", "By baking %s2% a cake when %_s2% moves into the neighbourhood.::|0|", "By donating a lot of food to %-s2% canned food drive.::", "By helping %s2% do %-s2% chores.::|0||2|", "By lending %s2% money to buy a cookie.::"];
questRS[4].def = "To be generous is to be willing to give someone else your belongings or time!";
questRS[5] = new Array();
questRS[5].name = "Forgiving";
questRS[5].quest = "<b>How can %i1% from %p1% be <font color='#FF9900'>Forgiving</font> to %i2% from %p2%?</b>";
questRS[5].ans = ["By accepting %-s2% apology when %_s2% makes a mistake.::|1||0|", "By pardoning %s2% for being rude.::|1||0|", "By remaining nice when %_s2% makes their team lose.::|1||0|", "By saying \"that's ok\" when %_s2% loses something important.::|1||0|", "By not turning mad when %_s2% eats the last piece of cake.::|1||0|", "By listening to %s2% when %_s2% is saying \"sorry\".::|1||0|"];
questRS[5].def = "Forgiving someone is excusing a mistake or offence that they have made!";
questRS[6] = new Array();
questRS[6].name = "Healthy";
questRS[6].quest = "<b>How can %i1% from %p1% act <font color='#FF9900'>Healthy</font> in front of %i2% from %p2%?</b>";
questRS[6].ans = ["By looking both ways before crossing the street.::|7|", "By eating very little junk food.::|7|", "By eating lots of fruits and vegtables every day.::|7|", "By drinking lots of water.::|7|", "By exercising daily.::|7|", "By using sunscreen in the summer.::|7|", "By teaching %s2% how to do push-ups.::|7||4|"];
questRS[6].def = "To be healthy is to keep your body and mind in good shape, and away from illness and injuries!";
questRS[7] = new Array();
questRS[7].name = "Wise";
questRS[7].quest = "<b>How can %i1% from %p1% act <font color='#FF9900'>Wise</font> in front of %i2% from %p2%?</b>";
questRS[7].ans = ["By reading a lot of books.::", "By always doing %-s1% own homework.::", "By sharing %-s1% knowledge with others.::|4|", "By getting an A+ on %-s1% school report.::", "By knowing the directions to where they want to go.::|3|", "By quoting a famous author.::", "By giving %s2% good work advice.::|4|"];
questRS[7].def = "Wisdom is a combination of intelligence (\"smartness\") and common sense!";
questRS[8] = new Array();
questRS[8].name = "Mean";
questRS[8].quest = "<b>How can %i1% from %p1% be <font color='#FF9900'>Mean</font> towards %i2% from %p2%?</b>";
questRS[8].ans = ["By spreading rumors about %s2%.::", "By calling %s2% rude names.::", "By tripping %s2% as %_s2% walks past.::", "By throwing things at %s2%.::", "By giving %s2% a friendly insult.::", "By talking about %s2% behind %-s2% back.", "By ignoring %s2%.", "By laughing at %s2%."];
questRS[9] = new Array();
questRS[9].name = "Annoying";
questRS[9].quest = "<b>How can %i1% from %p1% <font color='#FF9900'>Annoy</font> %i2% from %p2%?</b>";
questRS[9].ans = ["By always complaining to %s2%.::", "By ruining fun events.::", "By breaking %-s2% things.::", "By taking stuff from %s2% without asking.::", "By frowning at %s2% whenever %_s2% walks past.::", "By spilling a drink on %s2%.::", "By shouting angrily at %s2%.::", "By excluding %s2% from a group of friends.::"];
var i = 0;
while (i < questRS.length) {
questRS[i].fAns = new Array();
questRS[i].rAns = new Array();
i++;
}
sfxDrums = new Sound(this);
sfxDrums.attachSound("sfxDrums");
sfxFanfare = new Sound(this);
sfxFanfare.attachSound("sfxFanfare");
sfxBuzzer = new Sound(this);
sfxBuzzer.attachSound("sfxBuzzer");
sfxBell = new Sound(this);
sfxBell.attachSound("sfxBell");
sfxBoom = new Sound(this);
sfxBoom.attachSound("sfxBoom");
sfxBoom2 = new Sound(this);
sfxBoom2.attachSound("sfxBoom2");
sfxClick = new Sound(this);
sfxClick.attachSound("sfxClick");
clearInterval(gameInt);
gameInt = setInterval(this, "manGame", 40);
Symbol 1089 MovieClip Frame 1
function newText() {
switch (textShow) {
case 0 :
if (_parent.pRemaining == 0) {
endMess.text = "Perfect! You were able to easily match all of the planets! You are the best of them all!";
} else if (_parent.pRemaining <= 5) {
endMess.text = "Amazing! You were able to help several worlds become peaceful. What would they do without you?";
} else if (_parent.pRemaining <= 10) {
endMess.text = "Using your sense of virtue and your brain, you helped many planets befriend each other! Nice job!";
} else if (_parent.pRemaining <= 15) {
endMess.text = "You were able to use the powers of virtue to make a few planets into friends. Keep up the good work!";
} else {
endMess.text = "Nice try! You missed a few planets, though. Maybe you needed to leave early? Try again later!";
}
break;
case 1 :
endStats.text = "Friendly Planets: " + _parent.pMatched;
break;
case 2 :
endStats.text = endStats.text.concat("\nRemaining Planets: " + _parent.pRemaining);
break;
case 3 :
endStats.text = endStats.text.concat("\nQuestions Correct on First Try: " + _parent.qCorFirst);
break;
case 4 :
endStats.text = endStats.text.concat("\nQuestions Answered: " + _parent.qAnsd);
break;
case 5 :
endStats.text = endStats.text.concat("\nAsteroids Hit: " + _parent.asHit);
break;
case 6 :
endStats.text = endStats.text.concat("\nGame Time: " + _parent.gameTimStr);
break;
case 7 :
endScore.text = "Final Score: " + _parent.score;
sfxDrums.start();
break;
case 8 :
if (_parent.score > 100) {
endWogs.text = "You've Got Wogs!";
} else {
endWogs.text = "Hm... Not Many Wogs...";
}
_parent.con.enabled = true;
clearInterval(textInt);
}
textShow++;
}
sfxDrums = new Sound(this);
sfxDrums.attachSound("sfxDrums");
var textShow = 0;
clearInterval(textInt);
textInt = setInterval(this, "newText", 800);
Symbol 1097 MovieClip Frame 6
stop();
Symbol 1102 MovieClip Frame 1
if (_parent.pRemaining == 0) {
gotoAndPlay ("all");
} else {
gotoAndPlay ("common");
}
Symbol 1102 MovieClip Frame 36
fWorks.gotoAndPlay("plain");
Symbol 1102 MovieClip Frame 75
stop();
Symbol 1102 MovieClip Frame 107
fWorks.gotoAndPlay("plain");
Symbol 1102 MovieClip Frame 146
stop();
Symbol 1103 MovieClip Frame 1
score = Math.round(_parent.game.score);
pMatched = (_parent.game.pMatches * 2) + 1;
pRemaining = (_parent.game.objects.length - 3) - pMatched;
qCorFirst = _parent.game.qCorFirst;
qAnsd = _parent.game.qAnsd;
asHit = _parent.game.asHit;
gameTim = _parent.game.gameTim;
var tMin = Math.floor(gameTim / 60000);
var tSec = Math.floor((gameTim - (tMin * 60000)) / 1000);
var tMSec = Math.floor(((gameTim - (tMin * 60000)) - (tSec * 1000)) / 10);
if (tMin < 10) {
tMin = "0" + tMin;
}
if (tSec < 10) {
tSec = "0" + tSec;
}
if (tMSec < 10) {
tMSec = "0" + tMSec;
}
gameTimStr = (((tMin + ":") + tSec) + ":") + tMSec;
_parent.bgm[0].trgVol = 0;
_parent.bgm[0].fade = 5;
_parent.bgm[1].trgVol = 0;
_parent.bgm[1].fade = 5;
_parent.bgm[3].trgVol = 100;
_parent.bgm[3].fade = 10;
if (_quality == "MEDIUM") {
_parent.savQual = "MEDIUM";
_quality = "HIGH";
} else if (_quality == "LOW") {
_parent.savQual = "LOW";
_quality = "MEDIUM";
} else {
_parent.saveQual = "HIGH";
}
Symbol 1103 MovieClip Frame 40
_parent.nextFrame();
Symbol 1103 MovieClip Frame 59
con.onRelease = function () {
play();
};
_root.WPI_ArcadeStopSingleGame(score);
stop();
con.visible = false;
con.enabled = false;
Symbol 1103 MovieClip Frame 63
_parent.bgm[3].trgVol = 0;
_parent.bgm[3].fade = 9;
_parent.bgm[2].trgVol = 100;
_parent.bgm[2].fade = 9;
Symbol 1103 MovieClip Frame 138
con2.onRelease = function () {
_parent.play();
};
stop();
Symbol 1104 MovieClip Frame 1
function manageBGM() {
var _local2 = 0;
while (_local2 < bgm.length) {
if (bgm[_local2].vol < bgm[_local2].trgVol) {
if ((bgm[_local2].vol + bgm[_local2].fade) < bgm[_local2].trgVol) {
bgm[_local2].vol = bgm[_local2].vol + bgm[_local2].fade;
} else {
bgm[_local2].vol = bgm[_local2].trgVol;
}
this["bgm" + _local2].sound.setVolume(bgm[_local2].vol);
} else if (bgm[_local2].vol > bgm[_local2].trgVol) {
if ((bgm[_local2].vol - bgm[_local2].fade) > bgm[_local2].trgVol) {
bgm[_local2].vol = bgm[_local2].vol - bgm[_local2].fade;
} else {
bgm[_local2].vol = bgm[_local2].trgVol;
}
this["bgm" + _local2].sound.setVolume(bgm[_local2].vol);
}
if ((!bgm[_local2].playing) && (bgm[_local2].vol > 0)) {
this["bgm" + _local2].sound.start(0, 999);
trace("New music track started!");
bgm[_local2].playing = true;
}
if (bgm[_local2].vol <= 0) {
this["bgm" + _local2].sound.stop();
bgm[_local2].playing = false;
}
_local2++;
}
}
if (!initialized) {
var bgm = new Array();
this.createEmptyMovieClip("bgm0", this.getNextHighestDepth());
bgm0.sound = new Sound(bgm0);
bgm0.sound.attachSound("bgmSpace");
bgm[0] = new Array();
bgm[0].vol = 0;
bgm[0].trgVol = 0;
bgm[0].playing = false;
bgm[0].fade = 5;
this.createEmptyMovieClip("bgm1", this.getNextHighestDepth());
bgm1.sound = new Sound(bgm1);
bgm1.sound.attachSound("bgmQuiz");
bgm[1] = new Array();
bgm[1].vol = 0;
bgm[1].trgVol = 0;
bgm[1].playing = false;
bgm[1].fade = 5;
this.createEmptyMovieClip("bgm2", this.getNextHighestDepth());
bgm2.sound = new Sound(bgm2);
bgm2.sound.attachSound("bgmFanfare");
bgm[2] = new Array();
bgm[2].vol = 0;
bgm[2].trgVol = 0;
bgm[2].playing = false;
bgm[2].fade = 5;
this.createEmptyMovieClip("bgm3", this.getNextHighestDepth());
bgm3.sound = new Sound(bgm3);
bgm3.sound.attachSound("bgmSuspense");
bgm[3] = new Array();
bgm[3].vol = 0;
bgm[3].trgVol = 0;
bgm[3].playing = false;
bgm[3].fade = 5;
plySpd = 25;
initialized = true;
instsDone = false;
}
clearInterval(musicInt);
musicInt = setInterval(this, "manageBGM", 300);
Symbol 1104 MovieClip Frame 2
stop();
Symbol 1104 MovieClip Frame 3
stop();
Symbol 1104 MovieClip Frame 4
stop();
Symbol 1104 MovieClip Frame 27
if (saveQual) {
_quality = saveQual;
} else {
_quality = "MEDIUM";
}
stop();
Symbol 1104 MovieClip Frame 30
bgm[2].trgVol = 0;
bgm[2].fade = 10;
Symbol 1104 MovieClip Frame 110
gotoAndStop ("restart");