Frame 1
function dist(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function muteHandler() {
if (muted) {
globalSound.setVolume(0);
} else {
globalSound.setVolume(100);
}
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
stop();
k = 0;
onEnterFrame = function () {
var _local2 = Math.floor(framesLoaded / 4) - 1;
afw._x = afw._x - (0.3 * ((afw._x - _root["b" + _local2]._x) / 2));
afw._y = afw._y - (0.3 * ((afw._y - _root["b" + _local2]._y) / 2));
cat.removeMovieClip();
createEmptyMovieClip("cat", k++);
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
if ((framesLoaded >= 100) && (playMe.act == false)) {
playMe.act = true;
playMe.play();
}
perDisp = framesLoaded + "%";
i = 0;
while (i < 25) {
if (framesLoaded >= (i * 4)) {
_root["b" + i]._alpha = _root["b" + i]._alpha - (0.08 * ((_root["b" + i]._alpha - 100) / 2));
_root["b" + i]._x = _root["b" + i]._x - (0.3 * ((_root["b" + i]._x - _root["b" + i].mainX) / 2));
_root["b" + i]._y = _root["b" + i]._y - (0.3 * ((_root["b" + i]._y - _root["b" + i].mainY) / 2));
if (i != 0) {
}
}
base = 1.5;
if (_root["b" + i].hitTest(_xmouse, _ymouse)) {
if ((_xmouse - _root["b" + i]._x) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x - (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x - (base / (t + 1));
t++;
}
} else if ((_xmouse - _root["b" + i]._x) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x + (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x + (base / (t + 1));
t++;
}
}
if ((_ymouse - _root["b" + i]._y) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y - (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y - (base / (t + 1));
t++;
}
} else if ((_ymouse - _root["b" + i]._y) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y + (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y + (base / (t + 1));
t++;
}
}
}
i++;
}
};
i = 0;
while (i < 25) {
_root["b" + i].mainX = _root["b" + i]._x;
_root["b" + i].mainY = _root["b" + i]._y;
_root["b" + i]._y = 560;
_root["b" + i]._alpha = 0;
_root["b" + i].act = true;
i++;
}
var muted = false;
var globalSound = new Sound(this);
globalSound.setVolume(100);
function killAd() {
removeMovieClip(adBox);
}
stop();
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 5;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
Frame 3
stop();
Frame 4
function saveGame() {
savefile.data.ach1 = _root.ach1;
savefile.data.ach2 = _root.ach2;
savefile.data.ach3 = _root.ach3;
savefile.data.ach4 = _root.ach4;
savefile.data.ach5 = _root.ach5;
savefile.data.ach6 = _root.ach6;
savefile.data.ach7 = _root.ach7;
savefile.data.ach8 = _root.ach8;
i = 0;
while (i < myTimes.length) {
savefile.data.myTimes[i] = _root.myTimes[i];
i++;
}
savefile.data.oldName = _root.oldName;
savefile.flush();
}
stop();
var ach1 = false;
var ach2 = false;
var ach3 = false;
var ach4 = false;
var ach5 = false;
var ach6 = false;
var ach7 = false;
var ach8 = false;
var oldName;
var myTimes = new Array();
i = 0;
while (i < 30) {
myTimes.push(0);
i++;
}
trace(myTimes);
var savefile = SharedObject.getLocal("anima");
if ((savefile.data.oldName == undefined) || (oldName == "fewigmw")) {
savefile.data.myTimes = myTimes;
trace(savefile.data.myTimes);
gotoAndStop ("NOSAVEGAME");
savefile.flush();
} else {
trace(savefile.data.myTimes);
ach1 = savefile.data.ach1;
ach2 = savefile.data.ach2;
ach3 = savefile.data.ach3;
ach4 = savefile.data.ach4;
ach5 = savefile.data.ach5;
ach6 = savefile.data.ach6;
ach7 = savefile.data.ach7;
ach8 = savefile.data.ach8;
oldName = savefile.data.oldName;
i = 0;
while (i < 30) {
_root.myTimes[i] = savefile.data.myTimes[i];
i++;
}
gotoAndStop ("menu");
}
Frame 5
stop();
Frame 6
var levChoice = 1;
var teleSound = new Sound(this);
teleSound.attachSound("PS9MMS");
onEnterFrame = function () {
checkHit = false;
i = 0;
while (i < 30) {
if (_root["b" + i].hitTest(_root._xmouse, _root._ymouse)) {
blag._x = _root["b" + i]._x;
blag._y = _root["b" + i]._y - 10;
if (blag._visible == false) {
blag.fadeThing.gotoAndPlay(1);
blag._visible = true;
}
checkHit = true;
if (i < 10) {
blag.lev.text = "0" + i;
} else {
blag.lev.text = i;
}
if (myTimes[i] == 0) {
blag.yTime.text = "X";
blag.gotoAndStop(1);
} else if (myTimes[i] == 100) {
blag.yTime.text = "100";
blag.gotoAndStop(3);
} else if (myTimes[i] < 10) {
blag.yTime.text = "0" + myTimes[i];
} else {
blag.gotoAndStop(2);
blag.yTime.text = myTimes[i];
}
}
i++;
}
if (!checkHit) {
blag._visible = false;
}
};
stop();
i = 0;
while (i < 30) {
_root["b" + i].onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
levChoice = Number(this._name.substr(1, 2));
if (myTimes[levChoice] == 0) {
teleSound.start(0, 1);
} else {
playAll = false;
whiteFade.play();
}
}
};
i++;
}
var myProgress = 0;
i = 0;
while (i < 30) {
if (myTimes[i] > 0) {
_root["b" + i].inside.gotoAndStop(2);
myProgress = myProgress + 0.0166666666666667;
if (myTimes[i] == 100) {
_root["b" + i].inside.gotoAndStop(3);
myProgress = myProgress + 0.0166666666666667;
}
}
i++;
}
myProgress = Math.floor(myProgress * 100);
bg.gotoAndStop(myProgress + 1);
if (myProgress >= 100) {
goodStar.gotoAndStop(2);
}
if (myProgress < 10) {
myProgressDisp = ("0" + myProgress) + "%";
} else {
myProgressDisp = myProgress + "%";
}
var playMusic = new Sound(this);
playMusic.attachSound("hari");
Frame 7
function showLevelThing() {
i = 0;
while (i < 30) {
scoring.board["s" + i].levelNumber.text = i;
scoring.board["s" + i].flin.score.text = myTimes[i];
if (myTimes[i] == 0) {
scoring.board["s" + i]._visible = false;
} else {
scoring.board["s" + i]._visible = true;
}
i++;
}
}
function pauseGame() {
if (cStatus == 1) {
cStatus = 10;
scoring.gotoAndPlay(2);
i = 0;
while (i < 30) {
if (myTimes[i] == 0) {
scoring.board["s" + i].glag._visible = false;
} else {
scoring.board["s" + i].glag._visible = true;
scoring.board["s" + i].glag.gB.choice = i - 1;
scoring.board["s" + i].glag.gB.onRelease = function () {
_root.scoring.gotoAndStop(1);
_root.hideGlag();
_root["level" + _root.level].removeMovieClip();
_root.level = this.choice;
_root.loadNextLevel();
};
}
i++;
}
} else if (cStatus == 10) {
cStatus = 1;
hideGlag();
scoring.gotoAndPlay(21);
}
}
function hideGlag() {
z = 0;
while (z < 30) {
scoring.board["s" + z].glag._visible = false;
z++;
}
}
function triggerWin() {
finished.start(0, 1);
xPos = Math.floor(wand._x / tileSize);
yPos = Math.floor(wand._y / tileSize);
toN = _root["level" + level][(("dot" + xPos) + "x") + yPos];
i = 0;
while (i < 20) {
shel = _root.attachMovie("roxas", "s" + k, k++);
shel._x = toN._x;
shel._y = toN._y;
shel._rotation = random(360);
shel._xscale = random(75) + 40;
tap = Math.round(Math.random() * 16777215);
altColor = new Color(shel);
altColor.setRGB(tap);
i++;
}
if (myTimes[level] < levelScore) {
myTimes[level] = levelScore;
scoring.board["s" + level].flin.score._visible = false;
showLevelThing();
shel = attachMovie("flin", "flin", k++);
shel._x = scoreText._x;
shel._y = scoreText._y;
shel._xscale = 240;
shel._yscale = 240;
shel.score.text = myTimes[level];
} else {
showLevelThing();
}
checkLevelsCompeted();
flinPhase = 1;
cStatus = 4;
saveGame();
scoring.gotoAndPlay(2);
i = 0;
while (i < 30) {
scoring.board["s" + i].glag._visible = false;
i++;
}
}
function killSwitch() {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
_root[_local2].removeMovieClip();
}
}
}
function backOut() {
killSwitch();
stopAllSounds();
_root.playMusic.start(0, 999);
_root.gotoAndStop("menu");
}
function moveFlin() {
if (flinPhase == 1) {
flinCounter++;
goalX = ((scoring._x + scoring.board._x) + scoring.board["s" + level]._x) + 20;
goalY = ((scoring._y + scoring.board._y) + scoring.board["s" + level]._y) - 8;
easing("x", flin, goalX, 0.6);
easing("y", flin, goalY, 0.6);
easing("xscale", flin, 100, 0.6);
easing("yscale", flin, 100, 0.6);
if ((flinCounter > 100) || (((flin._xscale < 110) && (Math.abs(goalX - flin._x) < 1)) && (Math.abs(goalY - flin._y) < 1))) {
scoring.board["s" + level].flin.score._visible = true;
flin.removeMovieClip();
flinPhase = 2;
flinCounter = 0;
}
} else if (flinPhase == 2) {
flinCounter++;
if (flinCounter == 30) {
flinPhase = 3;
}
} else if (flinPhase == 3) {
scoring.gotoAndPlay(21);
flinPhase = 4;
} else if (flinPhase == 4) {
if (scoring._currentframe == 1) {
flinPhase = 5;
}
} else if (flinPhase == 5) {
loadNextLevel();
}
}
function loadNextLevel() {
cStatus = 5;
_root["level" + level].removeMovieClip();
level++;
totalDots = 0;
dotsCollected = 0;
enemiesList.splice(0, enemiesList.length);
wallList.splice(0, wallList.length);
switchList.splice(0, switchList.length);
mineList.splice(0, mineList.length);
gateList.splice(0, gateList.length);
teleporterList.splice(0, teleporterList.length);
loadLevel();
readyLevel();
}
function loadLevel() {
attachMovie("level" + level, "level" + level, k++);
wand._x = _root["level" + level].startingPoint._x;
wand._y = _root["level" + level].startingPoint._y;
if (level < 9) {
levelDisp = "0" + level;
} else {
levelDisp = level;
}
}
function readyLevel() {
shel = attachMovie("blackFadeIn", "blackFadeIn", k++);
i = 0;
while (i < enemiesList.length) {
if (_root["level" + level]["enemy" + enemiesList[i]].life == true) {
_root["level" + level]["enemy" + enemiesList[i]].removeMovieClip();
enemiesList.splice(i, 1);
i = 0;
}
i++;
}
resetLevel();
dCounter = 0;
cStatus = 3;
}
function readyOkayBegin() {
cStatus = 1;
xPos = Math.floor(wand._x / tileSize);
yPos = Math.floor(wand._y / tileSize);
toN = _root["level" + level][(("dot" + xPos) + "x") + yPos];
toN.inside.gotoAndStop(2);
scoreDot();
}
function deathCounter() {
dCounter++;
if (dCounter == 60) {
readyLevel();
}
}
function scoreBarStuff() {
levelScore = Math.round(100 * (dotsCollected / totalDots));
if (levelScore < levelScoreTemp) {
levelScoreTemp--;
}
if (levelScore > levelScoreTemp) {
levelScoreTemp++;
}
levelScoreTemp = levelScoreTemp - (0.3 * ((levelScoreTemp - levelScore) / 2));
levelScoreTemp2 = Math.round(levelScoreTemp);
if (levelScoreTemp2 < 10) {
scoreDisp = "00" + levelScoreTemp2;
} else if (levelScoreTemp2 < 100) {
scoreDisp = "0" + levelScoreTemp2;
} else {
scoreDisp = levelScoreTemp2;
}
easing("xscale", scoreBar.barW, levelScore, 0.3);
bg.gotoAndStop(levelScoreTemp2 + 1);
}
function resetLevel() {
for (var _local2 in _root["level" + level]) {
if (typeof(_root["level" + level]) == "movieclip") {
_root["level" + level][_local2].levelReset();
}
}
wand.wandDirection = 1;
wand._x = _root["level" + level].startingPoint._x;
wand._y = _root["level" + level].startingPoint._y;
wand.inside.gotoAndStop(1);
wand._rotation = 0;
levelScore = 0;
dotsCollected = 0;
gatesAre = "closed";
}
function death() {
breaker.start(0, 1);
cStatus = 2;
wand.inside.play();
levelScore = 0;
dotsCollected = 0;
w = 0;
while (w < 3) {
_root["point" + w] = new Object();
_root["point" + w].x = wand["hit" + w]._x;
_root["point" + w].y = wand["hit" + w]._y;
wand.localToGlobal(_root["point" + w]);
m = 0;
while (m < 5) {
shel = _root.attachMovie("starX", "s" + k, k++);
shel._x = _root["point" + w].x;
shel._y = _root["point" + w].y;
m++;
}
w++;
}
}
function activateDot() {
totalDots++;
}
function scoreDot() {
dotsCollected++;
k++;
createEmptyMovieClip("flim" + k, k);
flim = _root["flim" + k];
flim.setX = wand._x;
flim.setY = wand._y;
flim.onEnterFrame = function () {
this.createEmptyMovieClip("booga", k++);
this.tap = Math.round(Math.random() * 16777215);
this.lineStyle(3, this.tap, 100);
this.moveTo(_root.scoreBar._x + _root.scoreBar.barW._width, _root.scoreBar._y);
this.lineTo(this.setX, this.setY);
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
}
function keyPresses() {
if (Key.isDown(32) && (!spaceDown)) {
spaceDown = !spaceDown;
wand.wandDirection = wand.wandDirection * -1;
switter.start(0, 1);
} else if ((!Key.isDown(32)) && (spaceDown)) {
spaceDown = !spaceDown;
}
if (Key.isDown(83)) {
wand.bounced = true;
} else {
wand.bounced = false;
}
if (Key.isDown(65)) {
wand.switched = true;
} else {
wand.switched = false;
}
if (wand.switched || (wand.bounced)) {
wand.bgThing._visible = true;
} else {
wand.bgThing._visible = false;
}
}
function nameMe(mov) {
mov._name = "enemy" + eneCount;
enemiesList.push(eneCount);
eneCount++;
mov.startX = mov._x;
mov.startY = mov._y;
}
function nameThisWall(mov, bool) {
mov._name = "wall" + wallCount;
wallList.push(wallCount);
wallCount++;
}
function addSwitch(mov) {
mov._name = "switch" + switchCount;
switchList.push(switchCount);
switchCount++;
}
function addMine(mov) {
mov._name = "mine" + mineCount;
mineList.push(mineCount);
mineCount++;
}
function addGate(mov) {
mov._name = "gate" + gateCount;
gateList.push(gateCount);
gateCount++;
}
function moveEnemies() {
somethingHit = false;
grabDot(wand);
l = 0;
while (l < enemiesList.length) {
grabDot(_root["level" + level]["enemy" + enemiesList[l]]);
l++;
}
if (somethingHit) {
switchDown = true;
} else {
switchDown = false;
}
if (switchDown && (!buzz)) {
buzz = true;
if (gatesAre == "open") {
gatesAre = "closed";
hitIt.start(0, 1);
} else {
gatesAre = "open";
hitIt.start(0, 1);
}
} else if ((!switchDown) && (buzz)) {
buzz = false;
}
}
function grabDot(mov) {
mov._rotation = mov._rotation + (mov.wandSpeed * mov.wandDirection);
if (mov._rotation == -180) {
mov._rotation = 180;
}
i = 0;
while (i < 4) {
if (mov._rotation == _root["dir" + i]) {
_root["dt" + i] = true;
} else {
_root["dt" + i] = false;
}
i++;
}
xPos = Math.floor(mov._x / tileSize);
yPos = Math.floor(mov._y / tileSize);
to0 = _root["level" + level][(("dot" + (xPos + 1)) + "x") + yPos];
to1 = _root["level" + level][(("dot" + xPos) + "x") + (yPos + 1)];
to2 = _root["level" + level][(("dot" + (xPos - 1)) + "x") + yPos];
to3 = _root["level" + level][(("dot" + xPos) + "x") + (yPos - 1)];
toN = _root["level" + level][(("dot" + xPos) + "x") + yPos];
if (_root.toN.sheep == "bah") {
_root.toN.startCounter();
openGates();
}
mov._rotation = Math.floor(mov._rotation);
i = 0;
while (i < 4) {
if (_root["dt" + i] && (_root["to" + i].duck == "quack")) {
if (mov.switched || (mov.bounced)) {
mov._x = _root["to" + i]._x;
mov._y = _root["to" + i]._y;
mov._rotation = mov._rotation + 180;
if (mov._name == "wand") {
if (mov.switched) {
dinger.start(0, 1);
} else {
boun.start(0, 1);
}
}
if (_root["to" + i].horse == "neigh") {
for (j in _root["level" + level]) {
if (typeof(_root["level" + level][j]) == "movieclip") {
if (_root["level" + level][j].teleNum == _root["to" + i].teleNum) {
if (_root["level" + level][j]._name != _root["to" + i]._name) {
k++;
teleSound.start(0, 1);
createEmptyMovieClip("flim" + k, k);
flim = _root["flim" + k];
flim.setX = _root["level" + level][j]._x;
flim.setY = _root["level" + level][j]._y;
flim.setX2 = _root["to" + i]._x;
flim.setY2 = _root["to" + i]._y;
_root["level" + level][j].whiteBright.play();
_root["to" + i].whiteBright.play();
flim.onEnterFrame = function () {
this.createEmptyMovieClip("booga", k++);
this.lineStyle(random(3) + 1, 16777215, 40);
this.moveTo(this.setX2, this.setY2);
this.curveTo(random(550), random(550), this.setX, this.setY);
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
mov._x = _root["level" + level][j]._x;
mov._y = _root["level" + level][j]._y;
break;
}
}
}
}
}
if (mov.switched) {
mov.wandDirection = mov.wandDirection * -1;
}
if (mov._name == "wand") {
if ((((_root["to" + i].inside._currentframe == 1) && (_root["to" + i].horse != "neigh")) && (_root["to" + i].sheep != "bah")) && (_root["to" + i].fish != "blub")) {
_root["to" + i].inside.gotoAndStop(2);
scoreDot();
}
if (_root["to" + i].ender) {
triggerWin();
}
}
} else if (mov._name == "wand") {
misser.start(0, 1);
}
}
i++;
}
i = 0;
while (i < 3) {
_root["point" + i] = new Object();
_root["point" + i].x = mov["hit" + i]._x;
_root["point" + i].y = mov["hit" + i]._y;
mov.localToGlobal(_root["point" + i]);
i++;
}
i = 0;
while (i < wallList.length) {
j = 0;
while (j < 3) {
if (_root["level" + level]["wall" + wallList[i]].hitTest(mov["hit" + j])) {
mov.wandDirection = mov.wandDirection * -1;
}
j++;
}
i++;
}
i = 0;
while (i < switchList.length) {
j = 0;
while (j < 3) {
if (_root["level" + level]["switch" + switchList[i]].hitTest(mov["hit" + j])) {
_root["level" + level]["switch" + switchList[i]].gs.gotoAndPlay(2);
somethingHit = true;
}
j++;
}
i++;
}
if (mov._name == "wand") {
i = 0;
while (i < mineList.length) {
j = 0;
while (j < 3) {
if (_root["level" + level]["mine" + mineList[i]].hitTest(mov["hit" + j])) {
death();
}
j++;
}
i++;
}
if (gatesAre == "closed") {
i = 0;
while (i < gateList.length) {
j = 0;
while (j < 3) {
if (_root["level" + level]["gate" + gateList[i]].hitTest(mov["hit" + j])) {
death();
}
j++;
}
i++;
}
}
}
if (mov._name != "wand") {
i = 0;
while (i < 3) {
j = 0;
while (j < 2) {
if (mov["hit" + i].hitTest(wand["hit" + j])) {
death();
break;
}
j++;
}
i++;
}
}
}
function openGates() {
gatesAre = "open";
}
function closeGates() {
gatesAre = "closed";
}
function easing(pro, mov1, mov2, drift) {
switch (pro) {
case "x" :
mov1._x = mov1._x - (drift * ((mov1._x - mov2) / 2));
break;
case "y" :
mov1._y = mov1._y - (drift * ((mov1._y - mov2) / 2));
break;
case "xscale" :
mov1._xscale = mov1._xscale - (drift * ((mov1._xscale - mov2) / 2));
break;
case "yscale" :
mov1._yscale = mov1._yscale - (drift * ((mov1._yscale - mov2) / 2));
break;
case "width" :
mov1._width = mov1._width - (drift * ((mov1._width - mov2) / 2));
break;
case "height" :
mov1._height = mov1._height - (drift * ((mov1._height - mov2) / 2));
break;
case "alpha" :
mov1._alpha = mov1._alpha - (drift * ((mov1._alpha - mov2) / 2));
break;
case "rotation" :
mov1._rotation = mov1._rotation - (drift * ((mov1._rotation - mov2) / 2));
}
}
stop();
var level = levChoice;
var hitIt = new Sound(this);
hitIt.attachSound("CASTLE2");
var switter = new Sound(this);
switter.attachSound("swit009");
var teleSound = new Sound(this);
teleSound.attachSound("PS9MMS");
var dinger = new Sound(this);
dinger.attachSound("ding12");
var finished = new Sound(this);
finished.attachSound("4CH0C007");
var misser = new Sound(this);
misser.attachSound("wg");
var boun = new Sound(this);
boun.attachSound("ding122");
var breaker = new Sound(this);
breaker.attachSound("Waterhit");
showLevelThing();
var tileSize = 40;
var eneCount = 0;
var enemiesList = new Array();
var wallCount = 0;
var wallList = new Array();
var switchCount = 0;
var switchList = new Array();
var mineCount = 0;
var mineList = new Array();
var gateCount = 0;
var gateList = new Array();
var teleporterCount = 0;
var teleporterList = new Array();
var frameR = 36;
var buzz = false;
var k = 1;
wand.wandSpeed = 5;
wand.wandDirection = 1;
var spaceDown = false;
var dir0 = 0;
var dir1 = 90;
var dir2 = 180;
var dir3 = -90;
var cStatus = 1;
onEnterFrame = function () {
if (cStatus == 1) {
keyPresses();
moveEnemies();
gateControl();
}
scoreBarStuff();
if (Key.isDown(35)) {
resetLevel();
}
if (cStatus == 2) {
deathCounter();
}
if (cStatus == 3) {
}
if (cStatus == 4) {
moveFlin();
}
if (cStatus == 10) {
}
};
var levelScoreTemp = 0;
var levelScoreTemp2 = 0;
var dCounter = 0;
var flinCounter = 0;
var totalDots = 0;
var dotsCollected = 0;
switchDown = false;
somethingHit = false;
gatesAre = "closed";
loadLevel();
readyLevel();
Symbol 4 MovieClip Frame 1
this._alpha = 0;
Symbol 5 MovieClip [bounceWand] Frame 1
function levelReset() {
_rotation = 0;
_x = startX;
_y = startY;
wandDirection = 1;
}
bounced = true;
wandSpeed = 3;
wandDirection = 1;
_root.nameMe(this);
Symbol 6 MovieClip [switchWand] Frame 1
function levelReset() {
_rotation = 0;
_x = startX;
_y = startY;
wandDirection = 1;
}
switched = true;
wandDirection = 1;
wandSpeed = 5;
_root.nameMe(this);
Symbol 14 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 1
goal = random(20) + 10;
k = 3;
counter = 0;
onEnterFrame = function () {
counter++;
if (counter == goal) {
counter = 0;
goal = random(20) + 10;
shel = attachMovie("sider", "s" + k, k++);
switch (random(4)) {
case 0 :
shel._x = random(14) * 40;
shel._y = 0;
shel.yVel = random(10) + 10;
shel.xVel = 0;
break;
case 1 :
shel._x = random(14) * 40;
shel._y = 550;
shel._rotation = 180;
shel.yVel = -(1 * (random(10) + 10));
shel.xVel = 0;
break;
case 2 :
shel._x = 0;
shel._y = random(14) * 40;
shel.yVel = 0;
shel.xVel = random(10) + 10;
shel._rotation = -90;
break;
case 3 :
shel._x = 550;
shel._y = random(14) * 40;
shel._rotation = 90;
shel.yVel = 0;
shel.xVel = -(1 * (random(10) + 10));
}
shel._alpha = 10;
}
};
Symbol 25 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 36 Button
on (release) {
_root.killAd();
_root.play();
}
Symbol 37 MovieClip Frame 1
stop();
act = false;
Symbol 37 MovieClip Frame 10
stop();
Symbol 61 MovieClip [roxas] Frame 1
rotSpeed = random(8) + 1;
decay = 2 + random(4);
onEnterFrame = function () {
this._alpha = this._alpha - decay;
this._rotation = this._rotation + rotSpeed;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
Symbol 63 MovieClip [sider] Frame 1
counter = 0;
onEnterFrame = function () {
counter++;
if (counter == 240) {
this.removeMovieClip();
}
this._x = this._x + xVel;
this._y = this._y + yVel;
};
Symbol 67 MovieClip [starFlaw] Frame 1
xVel = (random(100) - 50) / 10;
yVel = (random(100) - 50) / 10;
grav = 0.3;
_xscale = (random(50) + 50);
_yscale = (random(50) + 50);
onEnterFrame = function () {
yVel = yVel + grav;
_x = (_x + xVel);
_y = (_y + yVel);
_alpha = (_alpha-1);
_rotation = (_rotation + xVel);
if (_alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 70 MovieClip [starX] Frame 1
xVel = (random(100) - 50) / 10;
yVel = (random(100) - 50) / 10;
grav = 0.3;
p1._alpha = random(2) * 100;
p2._alpha = random(2) * 100;
p3._alpha = random(2) * 100;
_xscale = (random(50) + 50);
_yscale = (random(50) + 50);
onEnterFrame = function () {
yVel = yVel + grav;
_x = (_x + xVel);
_y = (_y + yVel);
_alpha = (_alpha-1);
_rotation = (_rotation + xVel);
if (_alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 80 MovieClip Frame 1
tap = Math.round(Math.random() * 16777215);
altColor = new Color(flim.flimInside);
altColor.setRGB(tap);
Symbol 80 MovieClip Frame 45
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 1
function levelReset() {
inside.gotoAndStop(1);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
stop();
_root.activateDot();
Symbol 85 MovieClip Frame 1
function levelReset() {
inside.gotoAndStop(1);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
fish = "blub";
ender = true;
stop();
counter = 0;
onEnterFrame = function () {
if (_root.cStatus == 1) {
counter++;
if (counter == 5) {
counter = 0;
shel = _root.attachMovie("sphin", "sphin" + _root.k, _root.k++);
shel._x = this._x;
shel._y = this._y;
shel._xscale = random(100) + 50;
shel._yscale = random(100) + 50;
shel._rotation = random(360);
shel.alph = random(4) + 1;
shel.rotSpeed = 4 - random(8);
shel.onEnterFrame = function () {
this._rotation = this._rotation + this.rotSpeed;
this._alpha = this._alpha - this.alph;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
}
};
Symbol 88 MovieClip Frame 65
stop();
Symbol 89 MovieClip Frame 1
function levelReset() {
started.gotoAndPlay(1);
}
Symbol 99 MovieClip Frame 1
_root.addMine(this);
Symbol 115 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 1
function levelReset() {
inside.gotoAndStop(1);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
stop();
horse = "neigh";
teleNum = "a";
Symbol 117 MovieClip Frame 1
function levelReset() {
inside.gotoAndStop(1);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
stop();
horse = "neigh";
teleNum = "b";
_root.addTeleporter();
Symbol 118 MovieClip Frame 1
function levelReset() {
inside.gotoAndStop(1);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
stop();
horse = "neigh";
teleNum = "c";
_root.addTeleporter();
Symbol 125 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 1
stop();
_root.addSwitch(this);
Symbol 129 MovieClip Frame 1
onEnterFrame = function () {
holder.removeMovieClip();
if (_root.gatesAre == "closed") {
createEmptyMovieClip("holder", 1);
holder.lineStyle(6, 6710886, 100);
holder.moveTo(a1._x, a1._y);
holder.lineTo(a2._x, a2._y);
holder.lineStyle(random(4) + 1, 16777215, 30);
holder.moveTo(a1._x, a1._y);
holder.curveTo(10, random(20) - 10, a2._x, a2._y);
}
};
_root.addGate(this);
Symbol 132 MovieClip Frame 1
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
fish = "blub";
stop();
Symbol 136 MovieClip Frame 1
_root.nameThisWall(this, false);
Symbol 149 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
function levelReset() {
counter = 0;
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
fish = "blub";
stop();
counter = 0;
goal = 100;
onEnterFrame = function () {
if (_root.cStatus == 1) {
counter++;
if (counter == goal) {
counter = 0;
ref = _root["level" + _root.level].attachMovie("switchWand", "rude", _root.k++);
ref._x = this._x;
ref._y = this._y;
ref.life = true;
}
}
};
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 15
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
function levelReset() {
active = false;
counter = 0;
numDisplay = 0;
}
function startCounter() {
counter = 0;
numDisplay = numGoal;
active = true;
spinner.gotoAndPlay(2);
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
sheep = "bah";
stop();
counter = 0;
numDisplay = 0;
numGoal = 5;
active = false;
onEnterFrame = function () {
if (active && (_root.cStatus == 1)) {
counter++;
if ((counter % _root.frameR) == 0) {
numDisplay--;
bis.play();
}
if (numDisplay == 0) {
active = false;
spinner.gotoAndPlay(16);
counter = 0;
_root.closeGates();
}
}
};
Symbol 169 MovieClip Frame 1
function levelReset() {
started.gotoAndPlay(1);
}
Symbol 180 MovieClip Frame 1
function levelReset() {
_rotation = 0;
_x = startX;
_y = startY;
wandDirection = 1;
}
switched = true;
wandDirection = 1;
wandSpeed = 10;
_root.nameMe(this);
Symbol 183 MovieClip Frame 1
function levelReset() {
counter = 0;
}
this._x = Math.round(this._x);
this._y = Math.round(this._y);
posX = Math.floor(this._x / _root.tileSize);
posY = Math.floor(this._y / _root.tileSize);
this._name = (("dot" + posX) + "x") + posY;
duck = "quack";
fish = "blub";
stop();
counter = 0;
goal = 72;
onEnterFrame = function () {
if (_root.cStatus == 1) {
counter++;
if (counter == goal) {
counter = 0;
ref = _root["level" + _root.level].attachMovie("switchWand", "rude", _root.k++);
ref._x = this._x;
ref._y = this._y;
ref.life = true;
}
}
};
Symbol 199 MovieClip [level30] Frame 285
stopAllSounds();
_root.playMusic.start(0, 999);
_root.gotoAndStop("menu");
_root.killSwitch();
Symbol 204 MovieClip [blackFadeIn] Frame 30
_root.readyOkayBegin();
this.removeMovieClip();
Symbol 206 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 126
_parent.play();
Symbol 212 MovieClip Frame 1
stop();
Instance of Symbol 211 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Symbol 212 MovieClip Frame 2
_root.play();
Symbol 232 Button
on (release) {
_root.savefile.data.oldName = _root.oldName;
play();
}
Symbol 249 MovieClip Frame 1
_root.oldName = "Me";
Symbol 249 MovieClip Frame 10
stop();
Symbol 249 MovieClip Frame 191
_root.play();
Symbol 254 MovieClip Frame 1
stop();
Symbol 259 Button
on (release) {
i = 0;
while (i < 30) {
if (_root.myTimes[i] == 0) {
levChoice = i;
playAll = true;
whiteFade.play();
break;
}
i++;
}
if (_root.myTimes[29] > 0) {
levChoice = 30;
playAll = true;
whiteFade.play();
}
}
Symbol 265 Button
on (release) {
oldName = "fewigmw";
gotoAndStop ("router");
}
Symbol 269 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 280 MovieClip Frame 16
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 10
stop();
Symbol 287 MovieClip Frame 45
stopAllSounds();
_root.gotoAndStop("game");
Symbol 291 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 3
stop();
Symbol 295 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
this._visible = false;
Symbol 310 MovieClip Frame 1
stop();
Symbol 310 MovieClip Frame 20
stop();
Symbol 316 Button
on (release) {
pauseGame();
}
Symbol 320 Button
on (release) {
muted = !muted;
muteHandler();
}
Symbol 324 Button
on (press) {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
}
Symbol 328 Button
on (release) {
backOut();
}