Frame 1
fscommand ("showmenu", "false");
pLoadInit = false;
pTrackLoadCalled = false;
if (/:gGameID eq "") {
Set("/:gGameID", "lt_daffy");
}
if (/:gHSRoot_swf eq "") {
Set("/:gHSRoot_swf", "/games/med/");
}
if (/:gHSRoot_jsp eq "") {
Set("/:gHSRoot_jsp", "/web/load_variables/games/");
}
if (/:gHSRoot_top100 eq "") {
Set("/:gHSRoot_top100", "/web/games/");
}
function mLoadDone(lbSuccess) {
goLoader.mLoadDone(lbSuccess);
}
function cLoader(lmStage) {
this.pmStage = lmStage;
}
cLoader.prototype.mLoadLevels = function (lsFilename, loObject) {
this.poCallback = loObject;
this.poXML = new XML();
this.poXML.ignoreWhite = true;
this.poXML.onLoad = this.pmStage.mLoadDone;
this.poXML.load(lsFilename);
};
cLoader.prototype.mLoadDone = function (lbSuccess) {
this.poCallback.mLoadDone(this.poXML);
};
function cTile(lmStage, x, y, w, h, liCount, liContents) {
this.pmStage = lmStage;
this.piTileNum = liCount;
var _local2 = liCount + 100;
var _local3 = "tile_" + _local2;
this.pmClip = this.pmStage.attachMovie("piece_things", _local3, _local2);
this.pmClip._x = x;
this.pmClip._y = y;
this.pmClip._width = w;
this.pmClip._height = h;
this.pmClip.poParent = this;
this.pmClip.piNum = liCount;
this.pbMarked = false;
this.piContents = 20;
if (liContents == 0) {
this.piContents = -1;
}
this.pbOpen = false;
}
cTile.prototype.mDisplay = function () {
this.pmClip.gotoAndStop(this.piContents);
};
cTile.prototype.mClick = function () {
if (this.pmStage.goEditor != undefined) {
this.piContents = this.pmStage.goEditor.mGetType();
this.mDisplay();
} else if (this.pmStage.goGame.piState == 1) {
if ((this.piContents >= 25) and (this.piContents < 30)) {
this.pmStage.goGame.mSourceDrag(this.piContents - 25, true);
this.mSetContents(20);
}
}
};
cTile.prototype.mGetContents = function () {
return(this.piContents);
};
cTile.prototype.mRollOn = function () {
if (this.pmStage.pmLast == undefined) {
this.pmStage.pmLast = this;
} else {
this.pmStage.pmLast.mRollOff();
}
};
cTile.prototype.mRollOff = function () {
};
cTile.prototype.mSetContents = function (liContents) {
this.piContents = liContents;
this.pmClip.piContents = this.piContents;
this.mDisplay();
};
cTile.prototype.mGetX = function () {
return(this.pmClip._x);
};
cTile.prototype.mGetY = function () {
return(this.pmClip._y);
};
cTile.prototype.mGetTileNum = function () {
return(this.piTileNum);
};
cTile.prototype.mGetWidth = function () {
return(this.pmClip._width);
};
cTile.prototype.mGetHeight = function () {
return(this.pmClip._height);
};
cTile.prototype.mMark = function (liDir) {
var _local2 = "fill1";
if (this.piContents == 8) {
if ((liDir == 0) or (liDir == 2)) {
_local2 = "fill1";
if (this.pbMarked) {
_local2 = "fill3";
}
} else if ((liDir == 1) or (liDir == 3)) {
_local2 = "fill2";
if (this.pbMarked) {
_local2 = "fill4";
}
}
}
this.pmClip.path.gotoAndPlay(_local2);
this.pbMarked = true;
};
cTile.prototype.mIsMarked = function () {
var _local2 = this.pbMarked;
if (this.piContents == 8) {
_local2 = false;
}
return(_local2);
};
cTile.prototype.mIsCrossMarked = function () {
var _local2 = false;
if ((this.piContents == 8) and this.pbMarked) {
_local2 = true;
}
return(_local2);
};
cTile.prototype.mDispose = function () {
this.pmClip.removeMovieClip();
};
cTile.prototype.mRemove = function () {
this.mSetContents(18);
};
cTile.prototype.mOpen = function () {
if ((this.piContents == 23) or (this.piContents == 24)) {
this.pbOpen = true;
this.pmClip.door.play();
}
};
cTile.prototype.mIsOpen = function () {
return(this.pbOpen);
};
function cBoard(lmStage) {
this.pmStage = lmStage;
var _local4 = 67.5;
var _local10 = 33;
var _local13 = -62;
var _local14 = 62;
var _local15 = 19;
var _local12 = 10;
this.paTiles = new Array();
var _local9;
var _local11;
var _local5;
var _local8 = 0;
var _local6 = new Array();
_local6.push([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 0, 1, 0, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 1, 1, 0, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 1, 1, 1, 0, 0, 0, 0]);
_local6.push([0, 0, 1, 1, 1, 1, 0, 0, 0, 0]);
_local6.push([0, 0, 1, 1, 1, 1, 1, 0, 0, 0]);
_local6.push([0, 1, 1, 1, 1, 1, 1, 0, 0, 0]);
_local6.push([0, 1, 1, 1, 1, 1, 1, 1, 0, 0]);
_local6.push([1, 1, 1, 1, 1, 1, 1, 1, 0, 0]);
_local6.push([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
_local6.push([1, 1, 1, 1, 1, 1, 1, 1, 0, 0]);
_local6.push([0, 1, 1, 1, 1, 1, 1, 1, 0, 0]);
_local6.push([0, 1, 1, 1, 1, 1, 1, 0, 0, 0]);
_local6.push([0, 0, 1, 1, 1, 1, 1, 0, 0, 0]);
_local6.push([0, 0, 1, 1, 1, 1, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 1, 1, 1, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 1, 1, 0, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 0, 1, 0, 0, 0, 0, 0]);
_local6.push([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
var _local3 = 0;
while (_local3 < _local15) {
_local11 = _local14 + ((_local10 / 2) * _local3);
var _local2 = 0;
while (_local2 < _local12) {
_local5 = 0;
if ((_local3 / 2) == int(_local3 / 2)) {
_local5 = _local4 / 2;
}
_local9 = (_local13 + _local5) + (_local4 * _local2);
this.paTiles.push(new cTile(this.pmStage, _local9, _local11, _local4, _local10, _local8, _local6[_local3][_local2]));
_local8++;
_local2++;
}
_local3++;
}
var _local7 = 0;
while (_local7 < this.paTiles.length) {
this.paTiles[_local7].mDisplay();
_local7++;
}
this.poStart = this.paTiles[0];
this.pbActive = true;
}
cBoard.prototype.mGetTileContents = function (liTile) {
return(this.paTiles[liTile].mGetContents());
};
cBoard.prototype.mGetTileAt = function (liTile) {
return(this.paTiles[liTile]);
};
cBoard.prototype.mGetTiles = function () {
return(this.paTiles);
};
cBoard.prototype.mGetUnmarkedTiles = function () {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < this.paTiles.length) {
var _local2 = this.paTiles[_local3];
if (((_local2.piContents > 1) and (_local2.pbMarked == false)) and (_local2.piContents < 9)) {
_local4.push(_local2);
}
_local3++;
}
return(_local4);
};
cBoard.prototype.mOpenExit = function () {
var _local3 = 0;
while (_local3 < this.paTiles.length) {
var _local2 = this.paTiles[_local3];
if ((_local2.piContents == 23) or (_local2.piContents == 24)) {
_local2.mOpen();
break;
}
_local3++;
}
};
cBoard.prototype.mGetOtherWarp = function (loWhich) {
var _local5 = loWhich.mGetContents();
var _local4;
var _local3 = 0;
while (_local3 < this.paTiles.length) {
var _local2 = this.paTiles[_local3];
if ((_local2.piContents == _local5) and (_local2.piTileNum != loWhich.piTileNum)) {
_local4 = _local2;
break;
}
_local3++;
}
return(_local4);
};
cBoard.prototype.mCountKeys = function () {
var _local4 = 0;
var _local2 = 0;
while (_local2 < this.paTiles.length) {
var _local3 = this.paTiles[_local2];
if ((_local3.piContents == 15) or (_local3.piContents == 16)) {
_local4++;
}
_local2++;
}
return(_local4);
};
cBoard.prototype.mInit = function (laTiles) {
var _local2 = 0;
while (_local2 < laTiles.length) {
var _local3 = laTiles[_local2];
this.paTiles[_local2].mSetContents(_local3);
if (_local3 == 4) {
this.piStart = _local2;
}
if ((_local3 == 21) or (_local3 == 22)) {
this.piDoor = _local2;
}
_local2++;
}
};
cBoard.prototype.mGetStart = function () {
return(this.paTiles[this.piStart]);
};
cBoard.prototype.mGetDoor = function () {
return(this.paTiles[this.piDoor]);
};
cBoard.prototype.mGetNeighbor = function (loTile, liDir) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < int(this.paTiles.length / 2)) {
_local3.push([10, 11, -9, -10]);
_local3.push([9, 10, -10, -11]);
_local2++;
}
var _local4 = loTile.mGetTileNum();
var _local6 = int(_local4 / 10);
var _local7 = _local3[_local6];
var _local8 = _local7[liDir];
var _local5 = _local4 + _local8;
trace((((("Line: " + _local6) + ", Tile: ") + _local4) + ", NewTile: ") + _local5);
return(this.paTiles[_local5]);
};
cBoard.prototype.mDispose = function () {
var _local2 = 0;
while (_local2 < this.paTiles.length) {
var _local3 = this.paTiles[_local2];
_local3.mDispose();
_local2++;
}
};
cBoard.prototype.mErase = function (loTile) {
this.pbActive = false;
this.poErasingTile = loTile;
loTile.pmClip.gotoAndStop(29);
};
cBoard.prototype.mEraseDone = function () {
this.pbActive = true;
this.poErasingTile.mSetContents(this.pmStage.goGame.mGetNext());
};
cBoard.prototype.mFindTile = function (liX, liY) {
var _local5;
var _local2 = 0;
while (_local2 < this.paTiles.length) {
var _local3 = this.paTiles[_local2];
var _local4 = _local3.pmClip;
if (_local4.hitTest(liX, liY, true)) {
_local5 = _local3;
break;
}
_local2++;
}
return(_local5);
};
function cBot(lmStage, liSpeed) {
this.pmStage = lmStage;
this.piState = 0;
this.piXOff = 35;
this.piYOff = 15;
this.piSpeed = liSpeed;
this.piTurnSpeed = liSpeed / 10;
this.mInit();
}
cBot.prototype.mInit = function () {
this.pmClip = this.pmStage.attachMovie("jerry", "jerry", 1000);
this.pmClip.poParent = this;
this.pmClip._xscale = 60;
this.pmClip._yscale = 60;
this.pmClip._y = -70;
this.pbDie = false;
};
cBot.prototype.mUpdate = function () {
if (this.piState == 0) {
} else if (this.piState == 1) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
var _local9 = (this.piTargetY - this.piStartY) * _local6;
this.pmClip._alpha = int(_local6 * 100);
} else {
this.pmClip._y = this.poStartTile.mGetY() + this.piYOff;
this.poOrig = this.poStartTile;
this.poOrig.mMark(this.piDir);
this.poDest = this.pmStage.goGame.poBoard.mGetNeighbor(this.poStartTile, this.piDir);
this.piStartTime = getTimer();
this.piState = 2;
this.pbEdgeCheck = false;
this.pmClip._alpha = 100;
}
} else if (this.piState == 2) {
var _local6 = (getTimer() - this.piStartTime) / this.piSpeed;
var _local10 = false;
if ((_local6 > 0.5) and (this.pbEdgeCheck == false)) {
this.pbEdgeCheck = true;
var _local2 = this.poDest.mGetContents();
if (((_local2 == 2) or (_local2 == 21)) or (_local2 == 22)) {
this.mArrive();
} else if ((_local2 == 23) or (_local2 == 24)) {
if (this.poDest.mIsOpen() == false) {
this.mArrive();
}
} else {
this.pmStage.goGame.mAddTileScore(this.poDest);
}
} else if (_local6 < 1) {
this.pmClip._x = (this.poOrig.mGetX() + ((this.poDest.mGetX() - this.poOrig.mGetX()) * _local6)) + this.piXOff;
this.pmClip._y = (this.poOrig.mGetY() + ((this.poDest.mGetY() - this.poOrig.mGetY()) * _local6)) + this.piYOff;
} else {
this.pmClip._x = this.poDest.mGetX() + this.piXOff;
this.pmClip._y = this.poDest.mGetY() + this.piYOff;
this.mArrive();
}
} else if (this.piState == 3) {
if ((this.piStartTime + this.piTurnSpeed) < getTimer()) {
this.piDir = this.piNewDir;
var _local7 = this.piDir + 1;
if (this.piSpeed <= 500) {
_local7 = _local7 + 4;
}
this.pmClip.gotoAndStop(_local7);
this.piNextState = 2;
this.piWait = this.piTurnSpeed;
this.piStartTime = getTimer();
this.piState = 7;
}
} else if (this.piState == 4) {
var _local6 = (getTimer() - this.piStartTime) / this.piSpeed;
if (_local6 < 1) {
this.pmClip._y = this.piStartY + (20 * _local6);
this.pmClip._xscale = 60 - int(_local6 * 100);
if (this.pmClip._xscale < 0) {
this.pmClip._xscale = 0;
}
this.pmClip._yscale = 60 - int(_local6 * 100);
if (this.pmClip._yscale < 0) {
this.pmClip._yscale = 0;
}
this.pmClip._alpha = 100 - int(_local6 * 100);
} else {
this.pmClip._alpha = 0;
this.pmClip._y = 1200;
this.pmStage.goGame.mDaffyFell();
this.piState = 10;
}
} else if (this.piState == 5) {
this.pmClip.gotoAndStop(10);
this.piState = 10;
} else if (this.piState == 6) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
this.pmClip._alpha = 100 - int(_local6 * 100);
} else {
this.pmClip._alpha = 0;
this.pmClip._y = -200;
this.piState = 8;
}
} else if (this.piState == 7) {
if ((this.piStartTime + this.piWait) < getTimer()) {
this.piStartTime = getTimer();
this.piState = this.piNextState;
}
} else if (this.piState == 8) {
this.pmStage.goGame.mLevelDone();
this.piState = 9;
} else if (this.piState == 9) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
var _local9 = this.piStartY * (1 - _local6);
this.pmClip._y = _local9 + this.piYOff;
} else {
this.pmClip._y = -200;
this.pmStage.goGame.mDaffyFell();
this.piState = 10;
}
} else if (this.piState == 10) {
} else if (this.piState == 11) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
var _local9 = this.piStartY + ((this.piTargetY - this.piStartY) * _local6);
var _local8 = this.piStartX + ((this.piTargetX - this.piStartX) * _local6);
this.pmClip._y = _local9 + this.piYOff;
this.pmClip._x = _local8 + this.piXOff;
} else {
var _local3 = this.pmStage.goGame.poBoard.mGetNeighbor(this.poOrig, this.piDir);
var _local4 = this.pmStage.goGame.poBoard.mGetNeighbor(_local3, this.piDir);
var _local5 = _local3.mGetContents();
trace("CONTENTS: " + _local5);
if (((_local4 == undefined) or (_local5 == -1)) or (_local5 == 2)) {
trace("BLOCKED");
this.poDest = this.poOrig;
} else {
trace("JUMPING: " + _local4.mGetContents());
this.poOrig = _local3;
this.poDest = _local4;
this.piStartTime = getTimer();
}
this.piState = 12;
}
} else if (this.piState == 12) {
var _local6 = (getTimer() - this.piStartTime) / this.piSpeed;
if (_local6 < 1) {
this.pmClip._x = (this.poOrig.mGetX() + ((this.poDest.mGetX() - this.poOrig.mGetX()) * _local6)) + this.piXOff;
this.pmClip._y = (this.poOrig.mGetY() + ((this.poDest.mGetY() - this.poOrig.mGetY()) * _local6)) + this.piYOff;
} else {
this.pmClip._x = this.poDest.mGetX() + this.piXOff;
this.pmClip._y = this.poDest.mGetY() + this.piYOff;
this.mArrive();
}
} else if (this.piState == 13) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
this.pmClip._alpha = 100 - int(_local6 * 100);
} else {
this.pmClip._x = this.poDest.mGetX() + this.piXOff;
this.pmClip._y = this.poDest.mGetY() + this.piYOff;
this.poDest.pmClip.balls.play();
this.poOrig = this.poDest;
this.poDest = this.pmStage.goGame.poBoard.mGetNeighbor(this.poOrig, this.piDir);
this.piStartTime = getTimer();
this.piDuration = 1000;
this.piState = 14;
}
} else if (this.piState == 14) {
var _local6 = (getTimer() - this.piStartTime) / this.piDuration;
if (_local6 < 1) {
this.pmClip._alpha = int(_local6 * 100);
} else {
this.piStartTime = getTimer();
this.piState = 2;
}
}
};
cBot.prototype.mShockDone = function () {
this.mDead();
};
cBot.prototype.mSetSpeed = function (liSpeed) {
this.piSpeed = liSpeed;
var _local2 = this.piDir + 1;
this.piTurnSpeed = this.piTurnSpeed / 4;
if (this.piSpeed <= 500) {
_local2 = _local2 + 4;
}
this.pmClip.gotoAndStop(_local2);
};
cBot.prototype.mDrop = function (loTile) {
this.poStartTile = loTile;
var _local2 = this.pmStage.goGame.poBoard.mGetDoor();
_local2.pmClip.door.gotoAndStop(1);
this.piDir = _local2.mGetContents() - 21;
var _local4 = this.piDir + 1;
this.pmClip.gotoAndStop(_local4);
this.pmClip._x = loTile.mGetX() + this.piXOff;
this.piStartY = 0;
this.piTargetY = loTile.mGetY();
this.pmClip._y = this.piTargetY + this.piYOff;
this.pmClip._alpha = 0;
this.piStartTime = getTimer();
this.piDuration = 0;
this.piState = 1;
};
cBot.prototype.mArrive = function () {
var _local2 = this.poDest.mGetContents();
trace("Tile Type: " + _local2);
if (_local2 == undefined) {
_local2 = 0;
}
if ((_local2 == 30) or (_local2 == 13)) {
stopAllSounds();
this.pmStage.goGame.mPlaySound("whoosh");
this.piStartY = this.pmClip._y;
this.piStartX = this.pmClip._x;
this.piStartTime = getTimer();
this.piState = 4;
} else if (_local2 == 1) {
stopAllSounds();
this.pmStage.goGame.mPlaySound("whoosh");
this.piStartTime = getTimer();
this.piState = 5;
} else if ((_local2 == 10) or (_local2 == 14)) {
stopAllSounds();
this.pmStage.goGame.mPlaySound("whoosh");
this.piStartY = this.pmClip._y;
this.piTargetY = -100;
this.piStartTime = getTimer();
this.piDuration = 1000;
this.piState = 9;
} else if ((_local2 == 11) or (_local2 == 12)) {
this.poOrig = this.poDest;
this.poOrig.pmClip.balls.play();
this.poDest = this.pmStage.goGame.poBoard.mGetOtherWarp(this.poDest);
this.piStartTime = getTimer();
this.piDuration = 1000;
this.piState = 13;
} else if ((_local2 == 15) or (_local2 == 16)) {
this.poDest.mSetContents(20);
this.poDest.pmClip.balls.play();
this.pmStage.goGame.mPlaySound("xlylophone");
if (this.pmStage.goGame.poBoard.mCountKeys() == 0) {
this.pmStage.goGame.poBoard.mOpenExit();
this.pmStage.goGame.mPlaySound("squeak");
}
} else if (_local2 == 17) {
this.pmStage.goGame.mPlaySound("arpeggio");
this.pmStage.goGame.mGetCheese();
this.poDest.mSetContents(20);
this.poDest.pmClip.balls.play();
} else if (_local2 == 18) {
this.piNewDir = int(this.poDest.pmClip.arrowclip._currentframe / 40);
this.poOrig = this.poDest;
this.poDest = this.pmStage.goGame.poBoard.mGetNeighbor(this.poOrig, this.piNewDir);
this.piStartTime = getTimer();
this.piState = 3;
} else if (((_local2 == 23) or (_local2 == 24)) and this.poDest.mIsOpen()) {
stopAllSounds();
this.poDest.pmClip.door.gotoAndPlay("exit");
this.pmClip._visible = false;
this.pmStage.goGame.mPlaySound("end");
this.piStartTime = getTimer();
this.piDuration = 1500;
this.piState = 6;
} else if (_local2 == 29) {
this.pmStage.goGame.mPlaySound("boing");
var _local8 = "j" + this.piDir;
this.pmClip.gotoAndPlay(_local8);
this.poOrig = this.poDest;
this.piStartY = this.poDest.mGetY();
this.piStartX = this.poDest.mGetX();
var _local4 = this.pmStage.goGame.poBoard.mGetNeighbor(this.poDest, this.piDir);
this.piTargetX = _local4.mGetX();
this.piTargetY = _local4.mGetY();
this.piStartTime = getTimer();
this.piDuration = 200;
this.piState = 11;
} else {
var _local3 = this.mWhatsNext();
if ((((_local2 == 5) or (_local2 == 6)) or (_local2 == 7)) or (_local2 == 8)) {
this.poDest.mSetContents(20);
}
this.poOrig = this.poDest;
this.poDest = this.pmStage.goGame.poBoard.mGetNeighbor(this.poOrig, _local3);
this.pbEdgeCheck = false;
if (this.poDest == undefined) {
}
_local2 = this.poDest.mGetContents();
if (((_local2 == 23) or (_local2 == 24)) and this.poDest.mIsOpen()) {
stopAllSounds();
this.poDest.pmClip.door.gotoAndPlay("exit");
this.pmClip._visible = false;
this.pmStage.goGame.mPlaySound("end");
this.piStartTime = getTimer();
this.piDuration = 2500;
this.piState = 6;
return(undefined);
}
if (_local3 == this.piDir) {
this.piStartTime = getTimer();
this.piState = 2;
} else {
var _local5 = [[0, "L_1", 0, "R_3"], ["R_0", 0, "L_2", 0], [0, "R_1", 0, "L_3"], ["L_0", 0, "R_2", 0]];
var _local7 = _local5[this.piDir];
var _local8 = _local7[_local3];
this.piNewDir = _local3;
if ((((((_local2 == 2) or (_local2 == 13)) or (_local2 == 21)) or (_local2 == 22)) or (_local2 == 23)) or (_local2 == 24)) {
this.pmStage.goGame.mPlaySound("hit1");
this.piDir = this.piNewDir;
var _local6 = this.piDir + 1;
this.pmClip.gotoAndStop(_local6);
} else {
this.pmStage.goGame.mPlaySound("vibe");
this.piStartTime = getTimer();
this.piState = 3;
}
}
}
};
cBot.prototype.mWhatsNext = function () {
var _local3 = this.poDest.mGetContents();
var _local5 = [[0, 1, 2, 3], [0, 1, 2, 3], [2, 3, 0, 1], [0, 1, 2, 3], [0, 1, 2, 3], [0, 0, 0, 0], [1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [2, 3, 0, 1], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [], [], [0, 1, 2, 3], [2, 3, 0, 1], [2, 3, 0, 1], [2, 3, 0, 1], [2, 3, 0, 1], [0, 0, 0, 0], [1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [0, 1, 2, 3]];
var _local2 = _local5[_local3];
var _local4 = _local2[this.piDir];
return(_local4);
};
cBot.prototype.mDead = function () {
this.pmStage.goGame.mDaffysDead();
};
cBot.prototype.mTurnDone = function () {
this.piState = 3;
};
function cGame(lmStage) {
this.pmStage = lmStage;
this.piState = 0;
}
cGame.prototype.mLoad = function () {
this.pmStage.goLoader.mLoadLevels("tj.asp", this);
};
cGame.prototype.mLoadDone = function (loXMLData) {
this.paLevelData = new Array();
var _local11 = loXMLData.firstChild;
var _local9 = 0;
while (_local9 < _local11.childNodes.length) {
loListNode = _local11.childNodes[_local9];
var _local3 = 0;
while (_local3 < loListNode.childNodes.length) {
var _local2 = loListNode.childNodes[_local3];
var _local4 = _local2.nodeName;
if (_local4 == "tiles") {
var _local6 = _local2.firstChild.nodeValue;
var _local8 = _local6.split(",");
} else if (_local4 == "shots") {
var _local5 = _local2.firstChild.nodeValue;
var _local7 = _local5.split(",");
}
_local3++;
}
var _local10 = [_local8, _local7];
this.paLevelData.push(_local10);
_local9++;
}
this.pmStage.gotoAndPlay("menu");
this.piState = 1;
};
cGame.prototype.mUpdate = function () {
if (this.piState == 0) {
} else if (this.piState == 1) {
} else if (this.piState == 2) {
this.poBot.mUpdate();
} else if (this.piState == 3) {
this.piState = 4;
} else if (this.piState == 4) {
this.piState = this.piNextState;
} else if (this.piState == 5) {
this.piState = 0;
this.mLevelDoneResume();
} else if (this.piState == 6) {
this.piState = 0;
this.mGameOverResume();
} else if (this.piState == 7) {
var _local2 = this.poBoard.mGetStart();
this.poBot.mDrop(_local2);
this.pmStage.controls.gotoAndStop(2);
this.piState = 2;
}
};
cGame.prototype.mSourceDrag = function (liWhich, lbExists) {
if (this.piState == 1) {
this.piDraggy = -1;
if ((int(this.paDraggies[liWhich]) > 0) or (lbExists == true)) {
this.pmDraggy = this.pmStage.attachMovie("draggies", "tempdrag", 2000);
this.pmDraggy.gotoAndStop(liWhich + 1);
this.pmDraggy._x = _xmouse;
this.pmDraggy._y = _ymouse;
startDrag (this.pmDraggy, true);
this.piDraggy = liWhich;
this.pbDraggyExists = lbExists;
}
}
};
cGame.prototype.mSourceDrop = function () {
if (this.piState == 1) {
stopDrag();
removeMovieClip(this.pmDraggy);
var _local2 = this.poBoard.mFindTile(_xmouse, _ymouse);
if ((_local2 == undefined) or (this.piDraggy == -1)) {
} else if (_local2.mGetContents() == 20) {
this.mPlaySound("hit1");
_local2.mSetContents(25 + this.piDraggy);
if (this.pbDraggyExists == true) {
this.pbDraggyExists = false;
} else {
this.paDraggies[this.piDraggy] = int(this.paDraggies[this.piDraggy] - 1);
this.mUpdateDraggies();
}
} else {
this.mPlaySound("hit2");
if (this.pbDraggyExists == true) {
this.paDraggies[this.piDraggy] = int(this.paDraggies[this.piDraggy] + 1);
this.mUpdateDraggies();
this.pbDraggyExists = false;
}
}
}
this.piDraggy = -1;
};
cGame.prototype.mSetType = function (liType) {
this.piGameType = liType;
};
cGame.prototype.mInit = function () {
this.piScore = 0;
this.piSpeed = 1000;
this.piStartDelay = 60;
this.piLevel = 0;
this.piLevelCount = 0;
this.mNextLevel();
};
cGame.prototype.mNextLevel = function () {
this.piLevel++;
this.piLevelCount++;
if (this.piLevel > this.paLevelData.length) {
this.mWinner();
} else {
this.piLives = 5;
this.piBaseScore = this.piScore;
this.piBaseSpeed = this.piSpeed;
this.piBaseDelay = this.piStartDelay;
this.mInitLevel();
}
};
cGame.prototype.mStart = function () {
this.pmStage.music.gotoAndPlay("walk");
if (this.piState == 1) {
this.piState = 7;
}
};
cGame.prototype.mReset = function () {
trace(this.piLives);
if (this.piLives > 0) {
this.pmStage.fail3.gotoAndStop(1);
this.piLives--;
this.pmStage.jerrylives.play();
this.mInitLevel();
} else {
this.mGameOver();
}
};
cGame.prototype.mInitLevel = function () {
this.piScore = this.piBaseScore;
this.piSpeed = this.piBaseSpeed;
this.piStartDelay = this.piBaseDelay;
this.mUpdateScoreboard();
this.pmStage.gotoAndPlay("main");
this.poBoard = new cBoard(this.pmStage.gamespace);
this.pmStage.gsLevel = this.piLevel;
this.piState = 1;
this.piTurns = 0;
this.piLevelScore = 0;
this.piLevelBonus = 0;
this.piLevelTiles = 0;
this.piCrossCount = 0;
this.piTilesOne = 0;
this.piTilesTwo = 0;
this.piCrossBonus = 300;
this.piLevelPenalty = 0;
this.piTilesAway = 0;
this.piNeeded = 10;
this.piUsed = 0;
this.piScoreMult = 1;
this.piStartDelay = this.piStartDelay - 2;
this.poBot = new cBot(this.pmStage, this.piSpeed);
this.piDelay = this.piStartDelay * 1000;
this.piLevelStart = getTimer();
if (this.piGameType == 0) {
var _local3 = this.paLevelData[this.piLevel - 1];
var _local4 = _local3[0];
this.paDraggies = new Array();
var _local2 = 0;
while (_local2 < _local3[1].length) {
this.paDraggies.push(int(_local3[1][_local2]));
_local2++;
}
if (this.paDraggies.length < 5) {
this.paDraggies = [2, 2, 2, 2, 2];
}
this.poBoard.mInit(_local4);
} else if (this.piGameType == 1) {
}
this.mUpdateDraggies();
this.mUpdateScoreboard();
this.pmStage.music.gotoAndPlay("setup");
var _local5 = this.poBoard.mGetDoor();
_local5.pmClip.door.gotoAndStop(2);
this.pmStage.controls.gotoAndStop(1);
};
cGame.prototype.mDaffysDead = function () {
this.piLives--;
stopAllSounds();
if (this.piLives <= 0) {
this.mGameOver();
} else {
var _local2 = "lives" + this.piLives;
this.pmStage.ingame.lives.gotoAndPlay(_local2);
this.pmStage.fail3.gotoAndPlay(2);
this.pmStage.fail3.swapDepths(2000);
}
};
cGame.prototype.mDaffyFell = function () {
trace("Fell " + this.piLives);
this.piLives--;
stopAllSounds();
if (this.piLives <= 0) {
this.mGameOver();
} else {
var _local2 = "lives" + this.piLives;
this.pmStage.ingame.lives.gotoAndPlay(_local2);
this.pmStage.fail3.gotoAndPlay(2);
this.pmStage.fail3.swapDepths(2000);
}
};
cGame.prototype.mLevelDone = function () {
this.piNextState = 5;
this.piState = 3;
};
cGame.prototype.mLevelDoneResume = function () {
stopAllSounds();
if (this.piLives <= 0) {
this.mGameOver();
} else {
this.poBoard.mDispose();
this.pmStage.gotoAndPlay("leveldone");
}
};
cGame.prototype.mWinner = function () {
trace("winner");
this.poBoard.mDispose();
this.pmStage.gotoAndPlay("winner");
this.piState = 0;
};
cGame.prototype.mGameOverResume = function () {
if ((this.piUsed >= this.piNeeded) and (this.piLives > 0)) {
this.mLevelDone();
} else if ((this.piUsed < this.piNeeded) and (this.piLives > 0)) {
var _local2 = "lives" + this.piLives;
this.pmStage.ingame.lives.gotoAndPlay(_local2);
this.pmStage.fail1.gotoAndStop(2);
this.pmStage.fail1.swapDepths(2000);
} else {
this.poBoard.mDispose();
this.pmStage.gotoAndPlay("gameover");
this.mPlaySound("boing");
this.piState = 0;
}
};
cGame.prototype.mGameOver = function () {
this.poBoard.mDispose();
this.pmStage.gotoAndPlay("gameover");
this.mPlaySound("boing");
this.piState = 0;
};
cGame.prototype.mGetNext = function () {
this.piTurns++;
var _local2 = this.paNextTiles[0];
this.mSetNext();
return(_local2);
};
cGame.prototype.mUpdateDraggies = function () {
var _local2 = 0;
while (_local2 < this.paDraggies.length) {
var _local3 = "d" + _local2;
var _local4 = int(this.paDraggies[_local2]);
this.pmStage.dragpalette[_local3].gotoAndStop(_local4 + 1);
_local2++;
}
};
cGame.prototype.mAddPenalty = function () {
var _local2 = 50;
this.piScore = this.piScore - _local2;
this.piLevelScore = this.piLevelScore - _local2;
this.piLevelPenalty = this.piLevelPenalty + _local2;
this.mUpdateScoreboard();
};
cGame.prototype.mAddTileScore = function (loTile) {
this.piScore = this.piScore + (100 * this.piScoreMult);
this.piLevelScore = this.piLevelScore + (100 * this.piScoreMult);
this.mUpdateScoreboard();
};
cGame.prototype.mAddBonus = function () {
this.piTimeBonus = 0;
this.piFirstTryBonus = 0;
this.piAllArrowBonus = 0;
var _local4 = int((getTimer() - this.piLevelStart) / 1000);
if (_local4 < 120) {
this.piTimeBonus = 2400 - (_local4 * 20);
}
if (this.piLives == 5) {
this.piFirstTryBonus = 1000;
}
var _local3 = 0;
var _local2 = 0;
while (_local2 < this.paDraggies.length) {
_local3 = _local3 + this.paDraggies[_local2];
_local2++;
}
if (_local3 == 0) {
this.piAllArrowBonus = 1000;
}
this.piScore = this.piScore + ((this.piTimeBonus + this.piFirstTryBonus) + this.piAllArrowBonus);
this.mUpdateScoreboard();
};
cGame.prototype.mAddTile = function (loTile) {
var _local3 = [0, 400, 300, 200];
this.piTilesAway++;
if (loTile.mIsCrossMarked()) {
var _local2 = 100;
if (this.piTilesAway < 3) {
_local2 = int(_local3[this.piTilesAway]);
}
this.piCrossCount++;
this.piCrossBonus = this.piCrossBonus + int(_local2);
this.piTilesAway = 0;
this.piLevelBonus = this.piLevelBonus + this.piCrossBonus;
this.piScore = this.piScore + this.piCrossBonus;
this.mPlaySound("chaching");
}
this.mUpdateScoreboard();
};
cGame.prototype.mGetCheese = function () {
this.piScore = this.piScore + 1000;
this.mUpdateScoreboard();
this.mPlaySound("chaching");
};
cGame.prototype.mUpdateScoreboard = function () {
var _local6 = this.piScore;
var _local8 = [1, 10, 100, 1000, 10000, 100000];
var _local2 = _local8.length - 1;
while (_local2 >= 0) {
var _local4 = _local8[_local2];
var _local3 = int(_local6 / _local4);
_local6 = _local6 - (_local3 * _local4);
var _local7 = "s_" + _local2;
this.pmStage.scoreboard[_local7].gotoAndStop(_local3 + 1);
_local2--;
}
var _local5 = this.piLevel;
_local8 = [1, 10];
_local2 = _local8.length - 1;
while (_local2 >= 0) {
var _local4 = _local8[_local2];
var _local3 = int(_local5 / _local4);
_local5 = _local5 - (_local3 * _local4);
var _local7 = "L_" + _local2;
this.pmStage.scoreboard[_local7].gotoAndStop(_local3 + 1);
_local2--;
}
this.pmStage.gsScore = this.piScore;
this.pmStage.gsLevelScore = this.piLevelScore;
this.pmStage.gsBonus = this.piLevelBonus;
this.pmStage.gsPenalty = this.piLevelPenalty;
};
cGame.prototype.mPlaySound = function (lsSound) {
loSound = new Sound(this.pmStage);
loSound.attachSound(lsSound);
loSound.start();
};
cGame.prototype.mSoundOn = function () {
this.pbSound = true;
this.poSound = new Sound(this.pmStage);
this.poSound.setVolume(this.piOldVolume);
};
cGame.prototype.mSoundOff = function () {
this.pbSound = false;
this.poSound = new Sound(this.pmStage);
if (this.piOldVolume == undefined) {
this.piOldVolume = this.poSound.getVolume();
}
this.poSound.setVolume(0);
};
Instance of Symbol 249 MovieClip in Frame 1
onClipEvent (load) {
_parent.stop();
}
onClipEvent (enterFrame) {
if (_parent._framesloaded < _parent._totalframes) {
var liFrame = int((_parent._framesloaded / _parent._totalframes) * 100);
this.gotoAndStop(liFrame + 1);
} else {
this.gotoAndStop(101);
_parent.play();
}
}
Frame 2
if (_framesloaded < _totalframes) {
gotoAndPlay (1);
}
Frame 4
if (pLoadInit != true) {
Set("/:gGameState", "LOADING");
pLoadStartTime = int(getTimer() / 1000);
tellTarget ("/hs_scripts") {
call("mLoading");
};
pLoadInit = true;
}
if (/:gHSTrackLoad && (pTrackLoadCalled != true)) {
loadVariablesNum ((((("/tracking.html?game=" add /:gGameID) add "&stage=0&timer=") add pLoadStartTime) add "&random_id=") add pLoadStartTime, 0);
pTrackLoadCalled = true;
}
Frame 5
goLoader = new cLoader(this);
Frame 6
stop();
goGame = new cGame(this);
var loXML = new XML("<robo><level><tiles>-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,2,2,-1,-1,-1,-1,-1,-1,-1,-1,2,20,2,-1,-1,-1,-1,-1,-1,2,20,20,2,-1,-1,-1,-1,-1,-1,22,20,20,20,23,-1,-1,-1,-1,2,4,20,20,20,2,-1,-1,-1,-1,2,20,20,20,17,20,2,-1,-1,2,20,20,17,20,20,20,2,-1,-1,2,20,20,20,15,20,20,20,2,20,2,20,20,20,20,20,20,2,-1,-1,-1,2,20,20,20,20,20,2,-1,-1,-1,2,20,20,20,20,2,-1,-1,-1,-1,-1,2,20,20,20,2,-1,-1,-1,-1,-1,2,20,20,2,-1,-1,-1,-1,-1,-1,-1,2,20,2,-1,-1,-1,-1,-1,-1,-1,2,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1</tiles><shots>4,4,4,4,4</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,22,20,20,20,2,0,0,0,0,2,4,20,20,20,2,0,0,0,0,2,20,20,20,20,20,23,0,0,2,3,20,20,20,20,20,2,0,0,2,20,20,20,13,20,17,20,2,0,2,20,13,20,20,20,20,2,0,0,0,2,20,20,20,13,20,2,0,0,0,2,20,17,20,17,2,0,0,0,0,0,2,20,15,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,2,3,3,3</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,24,13,20,2,0,0,0,0,0,0,2,3,17,20,21,0,0,0,0,2,20,20,20,4,2,0,0,0,0,2,20,20,20,20,20,2,0,0,2,20,20,0,13,20,20,2,0,0,2,20,17,20,15,20,20,20,2,0,2,20,20,20,20,20,20,2,0,0,0,2,20,3,20,3,20,2,0,0,0,2,20,3,20,20,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,1,1,2,1</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,23,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,2,20,15,20,2,0,0,0,0,2,20,20,20,13,2,0,0,0,0,2,20,20,20,13,20,2,0,0,2,20,20,20,13,20,20,21,0,0,2,20,11,20,13,20,20,4,2,0,2,20,20,13,20,20,20,2,0,0,0,2,20,13,20,20,20,2,0,0,0,2,13,20,20,17,2,0,0,0,0,0,2,20,11,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>0,0,2,2,0</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,22,20,20,2,0,0,0,0,0,0,2,4,20,13,2,0,0,0,0,2,13,20,15,20,23,0,0,0,0,2,20,20,20,13,20,2,0,0,2,20,20,13,20,20,20,2,0,0,2,20,20,20,20,20,20,20,2,0,2,20,20,20,13,17,20,2,0,0,0,2,20,13,20,20,20,2,0,0,0,2,20,20,20,13,2,0,0,0,0,0,2,20,17,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>1,2,3,1,2</shots></level><level><tiles>-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,2,2,-1,-1,-1,-1,-1,-1,-1,-1,2,11,2,-1,-1,-1,-1,-1,-1,2,20,20,2,-1,-1,-1,-1,-1,-1,22,20,20,20,23,-1,-1,-1,-1,2,4,20,17,20,2,-1,-1,-1,-1,2,20,20,20,20,20,2,-1,-1,2,20,20,20,20,20,20,2,-1,-1,2,20,17,20,20,20,20,20,2,20,2,20,20,20,20,20,20,2,-1,-1,-1,2,20,20,20,20,20,2,-1,-1,-1,2,20,14,14,20,2,-1,-1,-1,-1,-1,2,14,15,14,2,-1,-1,-1,-1,-1,2,20,20,2,-1,-1,-1,-1,-1,-1,-1,2,11,2,-1,-1,-1,-1,-1,-1,-1,2,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1</tiles><shots>2,2,2,1,1</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,21,0,0,0,0,0,0,2,20,4,2,0,0,0,0,0,0,2,20,20,20,2,0,0,0,0,2,20,18,13,20,2,0,0,0,0,2,20,20,15,20,20,23,0,0,2,20,20,20,20,20,20,2,0,0,2,20,17,20,20,14,20,20,2,0,2,20,20,3,20,17,20,2,0,0,0,2,20,8,20,20,20,2,0,0,0,2,3,20,20,20,2,0,0,0,0,0,2,20,17,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,1,1,1,0</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,23,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,20,8,2,0,0,0,0,0,0,2,17,15,20,2,0,0,0,0,2,20,20,20,6,2,0,0,0,0,2,17,5,20,13,20,21,0,0,2,20,20,0,13,20,4,2,0,0,2,20,20,20,6,20,20,20,2,0,2,20,20,13,20,20,20,2,0,0,0,2,20,6,20,8,20,2,0,0,0,2,13,20,20,17,2,0,0,0,0,0,2,20,16,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>1,1,1,1,1</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,22,2,0,0,0,0,0,0,0,0,2,4,2,0,0,0,0,0,0,24,13,20,2,0,0,0,0,0,0,2,20,13,14,2,0,0,0,0,2,17,13,13,20,2,0,0,0,0,2,14,13,20,13,13,2,0,0,2,15,13,20,16,13,17,2,0,0,2,20,13,13,14,20,13,20,2,0,2,17,20,13,13,13,20,2,0,0,0,2,20,13,20,13,14,2,0,0,0,2,14,17,13,20,2,0,0,0,0,0,2,20,13,14,2,0,0,0,0,0,2,20,17,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,0,2,4,7</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,21,0,0,0,0,0,0,0,0,2,4,2,0,0,0,0,0,0,2,20,11,2,0,0,0,0,0,0,2,13,20,13,2,0,0,0,0,2,20,13,13,20,2,0,0,0,0,2,20,20,20,17,17,23,0,0,2,20,20,20,20,20,20,2,0,0,2,20,20,20,20,20,17,20,2,0,2,17,20,20,20,20,20,2,0,0,0,2,17,20,20,20,20,2,0,0,0,2,14,13,20,20,2,0,0,0,0,0,2,20,13,20,2,0,0,0,0,0,2,15,13,2,0,0,0,0,0,0,0,2,11,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>1,4,3,2,4</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,15,2,0,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,24,20,20,20,21,0,0,0,0,2,20,20,20,4,2,0,0,0,0,2,20,20,20,20,20,2,0,0,2,20,20,20,20,20,20,2,0,0,2,3,17,20,14,20,17,3,2,0,2,20,20,20,20,20,20,2,0,0,0,2,20,20,20,20,20,2,0,0,0,2,20,20,20,20,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,16,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>3,3,3,3,3</shots></level><level><tiles>-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,2,21,-1,-1,-1,-1,-1,-1,-1,-1,2,4,2,-1,-1,-1,-1,-1,-1,2,20,20,2,-1,-1,-1,-1,-1,-1,2,14,13,20,2,-1,-1,-1,-1,2,15,3,17,3,2,-1,-1,-1,-1,2,20,13,20,13,14,2,-1,-1,2,13,20,13,20,13,20,23,-1,-1,2,4,13,3,14,16,13,20,2,20,2,20,13,20,13,20,13,2,-1,-1,-1,2,17,20,13,17,20,2,-1,-1,-1,2,20,13,20,14,2,-1,-1,-1,-1,-1,2,18,14,20,2,-1,-1,-1,-1,-1,2,20,17,2,-1,-1,-1,-1,-1,-1,-1,2,20,2,-1,-1,-1,-1,-1,-1,-1,2,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1</tiles><shots>2,4,3,2,4</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,22,20,20,2,0,0,0,0,0,0,2,4,15,20,2,0,0,0,0,2,20,3,20,13,23,0,0,0,0,2,20,14,20,13,17,2,0,0,2,3,17,20,11,20,20,2,0,0,2,20,20,20,20,17,17,20,2,0,2,20,20,20,20,20,20,2,0,0,0,2,20,14,17,17,20,2,0,0,0,2,13,20,20,20,2,0,0,0,0,0,2,11,18,13,2,0,0,0,0,0,2,17,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,2,3,1,3</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,21,0,0,0,0,0,0,0,0,2,4,2,0,0,0,0,0,0,2,17,13,2,0,0,0,0,0,0,2,20,13,20,2,0,0,0,0,2,17,13,20,20,2,0,0,0,0,2,20,13,20,12,20,2,0,0,2,20,13,20,11,20,13,23,0,0,2,20,11,20,13,20,13,20,2,0,2,20,20,13,17,13,17,2,0,0,0,2,20,13,17,13,12,2,0,0,0,2,13,20,13,20,2,0,0,0,0,0,2,20,15,17,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>2,2,2,2,1</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,22,20,2,0,0,0,0,0,0,2,4,20,2,0,0,0,0,0,0,2,20,20,20,2,0,0,0,0,2,20,20,20,20,2,0,0,0,0,2,20,20,20,17,17,2,0,0,2,20,20,5,20,20,20,23,0,0,2,20,20,5,8,20,20,20,2,0,2,20,6,15,8,20,20,2,0,0,0,2,20,6,7,20,20,2,0,0,0,2,20,7,20,20,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>1,1,2,1,0</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,22,20,2,0,0,0,0,0,0,2,4,20,2,0,0,0,0,0,0,2,20,20,20,2,0,0,0,0,2,13,13,13,13,23,0,0,0,0,2,20,20,20,20,20,2,0,0,2,20,13,20,20,13,15,2,0,0,2,20,20,20,17,20,20,20,2,0,2,17,13,20,20,13,20,2,0,0,0,2,20,20,20,20,20,2,0,0,0,2,13,13,13,13,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,20,16,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>3,2,2,3,5</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,24,20,21,0,0,0,0,0,0,2,20,4,2,0,0,0,0,0,0,2,20,20,20,2,0,0,0,0,2,20,6,20,20,2,0,0,0,0,2,20,20,20,20,20,2,0,0,2,20,20,20,20,20,20,2,0,0,2,20,15,20,20,20,16,20,2,0,2,20,20,20,20,20,20,2,0,0,0,2,20,20,20,20,20,2,0,0,0,2,20,20,20,20,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>3,2,1,1,4</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,22,20,17,20,23,0,0,0,0,2,4,20,20,12,2,0,0,0,0,2,20,20,14,14,20,2,0,0,2,11,20,14,11,20,20,2,0,0,2,20,20,20,16,14,17,20,2,0,2,14,20,14,14,20,20,2,0,0,0,2,20,20,20,20,20,2,0,0,0,2,7,20,20,20,2,0,0,0,0,0,2,20,20,20,2,0,0,0,0,0,2,14,12,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>4,4,2,4,5</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,17,17,2,0,0,0,0,0,0,24,15,20,14,2,0,0,0,0,2,11,14,14,20,21,0,0,0,0,2,16,17,14,20,4,2,0,0,2,17,14,17,20,20,20,2,0,0,2,20,20,14,20,17,20,20,2,0,2,17,14,20,20,20,20,2,0,0,0,2,14,20,20,11,20,2,0,0,0,2,20,20,20,20,2,0,0,0,0,0,2,20,17,17,2,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>4,4,2,4,3</shots></level><level><tiles>0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,2,20,20,2,0,0,0,0,0,0,22,20,20,20,2,0,0,0,0,2,4,17,20,20,23,0,0,0,0,2,20,20,20,13,12,2,0,0,2,17,20,13,13,13,17,2,0,0,2,11,20,13,20,17,20,20,2,0,2,20,20,20,20,12,20,2,0,0,0,2,20,20,20,17,13,2,0,0,0,2,20,13,20,20,2,0,0,0,0,0,2,13,20,11,2,0,0,0,0,0,2,20,15,2,0,0,0,0,0,0,0,2,20,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</tiles><shots>4,4,4,4,4</shots></level></robo>");
goGame.mLoadDone(loXML);
Frame 10
music.gotoAndPlay(1);
tellTarget ("/hs_scripts") {
call("mLoaded");
};
Frame 23
stop();
Frame 26
stop();
Frame 35
stopAllSounds();
tellTarget ("/hs_scripts") {
call("mPlay");
};
Instance of Symbol 464 MovieClip "speedometer" in Frame 47
onClipEvent (load) {
this.piFrameCount = 0;
this.piLast = getTimer();
this.psFPS = "0 fps";
this.pbVisible = true;
this.piDebounce = 0;
this.piOnPos = 743;
this._x = this.piOnPos;
}
onClipEvent (enterFrame) {
_parent.goGame.mUpdate();
if (Key.isDown(83) and ((this.piDebounce + 500) < getTimer())) {
this.pbVisible = !this.pbVisible;
this.piDebounce = getTimer();
if (this.pbVisible) {
this._x = this.piOnPos;
} else {
this._x = this.piOnPos + 100;
}
}
if ((this.piLast + 1000) < getTimer()) {
this.psFPS = this.piFrameCount + " fps";
this.piFrameCount = 0;
this.piLast = getTimer();
} else {
this.piFrameCount++;
}
}
Frame 48
goGame.mInit();
Frame 50
tellTarget ("/hs_scripts") {
call("mLevelStart");
};
Frame 51
stop();
Frame 56
stop();
Frame 63
gScore = gsScore;
tellTarget ("/hs_scripts") {
call("mGameOver");
};
Frame 64
stop();
Frame 73
gScore = gsScore;
Frame 74
stop();
Symbol 122 MovieClip [jerry] Frame 1
stop();
Symbol 122 MovieClip [jerry] Frame 40
gotoAndStop (1);
Symbol 122 MovieClip [jerry] Frame 75
gotoAndStop (2);
Symbol 122 MovieClip [jerry] Frame 110
gotoAndStop (3);
Symbol 122 MovieClip [jerry] Frame 145
gotoAndStop (4);
Symbol 136 MovieClip [draggies] Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 168 Button
on (press) {
this.poParent.mClick();
}
on (rollOver) {
this.poParent.mRollOn();
}
on (rollOut) {
this.poParent.mRollOff();
}
on (release, releaseOutside) {
this.poParent.pmStage.goGame.mSourceDrop();
}
Symbol 210 MovieClip Frame 31
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 31
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 1
Symbol 228 MovieClip Frame 57
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 22
stop();
Symbol 229 MovieClip Frame 29
stop();
Symbol 230 MovieClip [piece_things] Frame 1
stop();
Symbol 263 Button
on (press) {
startDrag ("");
}
on (release) {
stopDrag();
}
Symbol 264 Button
on (release) {
Set("/:gDebug", "");
}
Symbol 265 MovieClip Frame 1
if (/:gDebugMode == true) {
_x = 50;
}
Symbol 265 MovieClip Frame 5
stop();
Symbol 267 MovieClip Frame 1
loadMovie (/:gHSRoot_swf add "HSScripts.swf", "");
Symbol 267 MovieClip Frame 4
stop();
Symbol 270 MovieClip Frame 5
stop();
Symbol 270 MovieClip Frame 6
stopAllSounds();
Symbol 270 MovieClip Frame 8
stop();
Symbol 270 MovieClip Frame 12
stopAllSounds();
Symbol 270 MovieClip Frame 14
stop();
Symbol 289 Button
on (press) {
gotoAndPlay ("instructions");
}
Symbol 296 Button
on (press) {
goGame.mSetType(0);
gotoAndPlay ("start");
}
Symbol 364 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 2
stop();
Symbol 364 MovieClip Frame 3
stop();
Symbol 364 MovieClip Frame 4
stop();
Symbol 364 MovieClip Frame 5
stop();
Symbol 364 MovieClip Frame 8
gotoAndStop ("four");
Symbol 370 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 7
stop();
Symbol 370 MovieClip Frame 13
stop();
Symbol 370 MovieClip Frame 19
stop();
Symbol 370 MovieClip Frame 26
stop();
Symbol 370 MovieClip Frame 31
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 407 Button
on (press) {
_parent.goGame.mSetType(0);
_parent.gotoAndPlay("start");
}
Symbol 410 Button
on (press) {
play();
}
Symbol 442 MovieClip Frame 67
stop();
Symbol 442 MovieClip Frame 148
stop();
Symbol 442 MovieClip Frame 569
stop();
Symbol 442 MovieClip Frame 711
stop();
Symbol 442 MovieClip Frame 943
stop();
Symbol 442 MovieClip Frame 1000
stop();
Symbol 442 MovieClip Frame 1104
stop();
Symbol 442 MovieClip Frame 1264
stop();
Symbol 447 MovieClip Frame 11
stop();
Symbol 450 MovieClip Frame 11
stop();
Symbol 453 MovieClip Frame 11
stop();
Symbol 457 MovieClip Frame 10
stop();
Symbol 461 MovieClip Frame 1
_visible = 0;
Symbol 461 MovieClip Frame 5
stop();
Symbol 465 Button
on (press) {
_parent.goGame.mStart();
}
Symbol 466 Button
on (press) {
_parent.goGame.mReset();
}
Symbol 467 MovieClip Frame 1
stop();
Symbol 471 Button
on (press) {
goGame.mNextLevel();
}
Symbol 472 Button
on (press) {
goGame.mSourceDrag(2);
}
on (release, releaseOutside) {
goGame.mSourceDrop();
}
Symbol 473 Button
on (press) {
goGame.mSourceDrag(0);
}
on (release, releaseOutside) {
goGame.mSourceDrop();
}
Symbol 474 Button
on (press) {
goGame.mSourceDrag(1);
}
on (release, releaseOutside) {
goGame.mSourceDrop();
}
Symbol 475 Button
on (press) {
goGame.mSourceDrag(4);
}
on (release, releaseOutside) {
goGame.mSourceDrop();
}
Symbol 477 Button
on (press) {
goGame.mSourceDrag(3);
}
on (release, releaseOutside) {
goGame.mSourceDrop();
}
Symbol 484 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 495 Button
on (press) {
_parent.goGame.mNextLevel();
}
Symbol 496 MovieClip Frame 1
_parent.goGame.mAddBonus();
var liRemainder = _parent.goGame.piScore;
var laDiv = [1, 10, 100, 1000, 10000, 100000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("s_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
var liRemainder = _parent.goGame.piTimeBonus;
var laDiv = [1, 10, 100, 1000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("sb_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
var liRemainder = _parent.goGame.piFirstTryBonus;
var laDiv = [1, 10, 100, 1000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("fb_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
var liRemainder = _parent.goGame.piAllArrowBonus;
var laDiv = [1, 10, 100, 1000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("ab_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
var liLevel = _parent.goGame.piLevel;
var laDiv = [1, 10];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liLevel / liDiv);
liLevel = liLevel - (liVal * liDiv);
var lsClip = ("L_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
Symbol 496 MovieClip Frame 28
stop();
Symbol 501 Button
on (press) {
_parent.gotoAndPlay("menu");
}
Symbol 506 MovieClip Frame 1
var liRemainder = _parent.goGame.piScore;
var laDiv = [1, 10, 100, 1000, 10000, 100000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("s_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}
Symbol 519 MovieClip Frame 1
var liRemainder = _parent.goGame.piScore;
var laDiv = [1, 10, 100, 1000, 10000, 100000];
var i = (laDiv.length - 1);
while (i >= 0) {
var liDiv = laDiv[i];
var liVal = int(liRemainder / liDiv);
liRemainder = liRemainder - (liVal * liDiv);
var lsClip = ("s_" + i);
score[lsClip].gotoAndStop(liVal + 1);
i--;
}