Frame 3
function atan(mx, my, cx, cy) {
dx = mx - cx;
dy = my - cy;
at = (Math.atan(dy / dx) * 180) / Math.PI;
if (dx >= 0) {
if (dy >= 0) {
angle = at;
} else {
angle = at + 360;
}
}
if (dx < 0) {
if (dy > 0) {
angle = at + 180;
} else {
angle = at + 180;
}
}
return(angle);
}
function fAddGold(who) {
pGold.push(who);
}
function fAddRock(who) {
pRocks.push(who);
}
function fSetLevel() {
pLevelText = "level " + pLevel;
}
fscommand ("allowscale", false);
fscommand ("allowscale", false);
pSlideAdd = 0;
pScoreText = "";
score = 0;
pGold = [];
pRocks = [];
_global.fGetDistance = function (a, b) {
var _local1 = b;
var _local2 = a;
return(Math.sqrt(((_local2.x - _local1.x) * (_local2.x - _local1.x)) + ((_local2.y - _local1.y) * (_local2.y - _local1.y))));
};
pLevel = 1;
pLevelText = "";
fSetLevel();
Instance of Symbol 55 MovieClip in Frame 3
onClipEvent (enterFrame) {
this.bar._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.gotoAndPlay("menu");
}
}
Frame 6
stop();
Frame 8
score = 0;
pLevel = 1;
_root.pGameEndType = "TIME UP";
pLastLevel = false;
pSection = "menu";
inSFX.sMusic();
stop();
Frame 10
stop();
Frame 15
stop();
Frame 21
pLevel = 1;
Instance of Symbol 126 MovieClip "inKeys" in Frame 21
onClipEvent (load) {
function fSelectGold() {
var _local2 = _parent;
var tCount = 0;
var _local3 = 0;
while (_local3 < 50) {
var _local1 = random(_local2.pGold.length);
if (_local2.pGold[_local1].pHighlighted == false) {
if (_local2.pGold[_local1].pPicked == false) {
tCount++;
_local2.pGold[_local1].inGold.gotoAndStop(2);
_local2.pGold[_local1].pHighlighted = true;
_root.inSFX.fNoise("newgold");
return;
}
}
_local3++;
}
}
function fCheckKeys() {
var _local1 = _root;
var _local3 = _parent;
var _local2 = false;
if (Key.isDown(38)) {
if (_local1.pMode == "ready") {
} else if (_local1.pMode == "reel") {
fRopeLength(-3);
_local3.base.inManLever.fMove("up");
_local2 = true;
}
}
if (Key.isDown(40)) {
if (_local1.pMode == "ready") {
_local1.inSFX.fNoise("fire");
_local1.inSFX.fSJ("off");
fRopeFire();
_local3.base.inManLever.fMove("down");
_local2 = true;
} else if (_local1.pMode == "reel") {
fRopeLength(3);
_local3.base.inManLever.fMove("down");
_local2 = true;
}
}
if (Key.isDown(37)) {
if ((_local1.pMode == "ready") or (_local1.pMode == "reel")) {
fMoveBase(-1 * pSpeedFactor);
_local3.base.inManLever.fMove("left");
_local2 = true;
if (pLastSideKey != "right") {
_local1.inSFX.fSJ("on");
}
pLastSideKey = "left";
} else {
_local1.inSFX.fSJ("off");
}
} else if (Key.isDown(39)) {
if ((_local1.pMode == "ready") or (_local1.pMode == "reel")) {
fMoveBase(1 * pSpeedFactor);
_local3.base.inManLever.fMove("right");
_local2 = true;
if (pLastSideKey != "right") {
_local1.inSFX.fSJ("on");
}
pLastSideKey = "right";
} else {
_local1.inSFX.fSJ("off");
}
} else {
pLastSideKey = "none";
_local1.inSFX.fSJ("off");
}
if (_local2 == false) {
_local3.base.inManLever.fMove("off");
}
}
function fMoveBase(dir) {
pDir = pDir + (dir * pAcc);
}
function fMoveBaseFrame() {
pDir = pDir * 0.9;
fCheckBasePos();
_root.base._x = _root.base._x + pDir;
}
function fRopeLength(dir) {
if (Math.abs(pRopeLength + dir) < 200) {
pRopeLength = pRopeLength + dir;
_parent.inRope.gotoAndStop(Math.abs(pRopeLength));
}
}
function fRopeFire() {
pRopeLengthMissedSpeed = 5;
pRopeLength = 1;
pDir = 0;
_root.pMode = "fire";
_parent.inRope.fResetMomentum();
}
function fCheckBasePos() {
if ((_root.base._x + pDir) > 500) {
pDir = 0;
} else if ((_root.base._x + pDir) < 50) {
pDir = 0;
}
}
function fCheckRocks() {
var _local2 = _parent;
var _local3 = _root;
fCheckGold();
var _local1 = 0;
while (_local1 < _local2.pRocks.length) {
if (_local2.pRocks[_local1].pPicked == false) {
if (pRockPicked == undefined) {
if (_local2.pRocks[_local1].hitTest(point.x, point.y, 1)) {
_local2.inHitEffect.fPlay(point);
_local3.pMode = "missed";
pRopeLengthMissedSpeed = 2;
_local3.inSFX.fNoise("hit");
}
} else {
return;
}
}
_local1++;
}
}
function fCheckGold() {
var _local1 = _parent;
var _local3 = _root;
var _local2 = 0;
while (_local2 < _local1.pGold.length) {
if (_local1.pGold[_local2].pPicked == false) {
if (pRockPicked == undefined) {
if (_local1.pGold[_local2].inHit.hitTest(point.x, point.y, 1)) {
if (_local1.pGold[_local2].pHighlighted == true) {
_local3.inSFX.fNoise("pick");
_local1.inHitEffect.fPlay(point);
pRockPicked = _local1.pGold[_local2];
_local1.pGold[_local2].fPickedUp();
_local3.pMode = "reel";
_local1.inRope.inClaw.gotoAndStop("shut");
fSelectGold();
} else {
_local3.inSFX.fNoise("pickhit");
pRopeLengthMissedSpeed = 3;
_local1.inHitEffect.fPlay(point);
_local1.pGold[_local2].fMatch(_local1.pGold[_local2], _local1.pGold[_local2].pHitMC);
_local1.pGold[_local2].fCollide(this, _local1.pGold[_local2]);
}
}
} else {
return;
}
}
_local2++;
}
}
function fCheckEnd() {
var _local2 = _parent;
var _local3 = false;
var _local1 = 0;
while (_local1 < _local2.pGold.length) {
if (_local2.pGold[_local1].pPicked == false) {
_local3 = true;
break;
}
_local1++;
}
if (_local3 == false) {
fEndLevel();
}
}
function fTimeup() {
_root.pMode = "gameover";
_root.gotoAndPlay("end");
}
function fEndLevel() {
var _local2 = _parent;
var _local3 = _root;
_local3.inBonus.fAddScore(_local3.inTime.pTime * 10);
_local3.inTime.fNewTime(0);
pWait = 60;
_local3.inOL.play();
_local3.pMode = "fade";
var _local1 = 0;
while (_local1 < _local2.pGold.length) {
_local2.pGold[_local1].fSetToFade();
_local1++;
}
_local1 = 0;
while (_local1 < _local2.pRocks.length) {
_local2.pRocks[_local1].fSetToFade();
_local1++;
}
}
function fNextLevel() {
var _local1 = _root;
if (_local1.pLastLevel == true) {
_local1.pMode = "gameover";
_local1.pGameEndType = "CONGRATULATIONS";
_local1.gotoAndPlay("end");
} else {
_parent.pGold = [];
_parent.pRocks = [];
_local1.pSlideAdd = 550;
_local1.inBG.play();
_local1.play();
}
}
function fAddLevel() {
_root.pLevel++;
_root.fSetLevel();
}
function fNextLevelReady() {
pStart = 70;
_root.pMode = "slidein";
}
function fNextLevelReady2() {
var _local2 = _parent;
var _local1 = 0;
while (_local1 < _local2.pGold.length) {
_local2.pGold[_local1].pPicked = false;
_local1++;
}
_local1 = 0;
while (_local1 < _local2.pRocks.length) {
_local2.pRocks[_local1].pPicked = false;
_local1++;
}
_root.pMode = "ready";
_root.inTime.fNewTime(45);
fSelectGold();
fSelectGold();
}
function fCollisionEnd() {
pRockPicked = undefined;
_root.pMode = "missed";
pRopeLengthMissedSpeed = 5;
}
function fCollision() {
_parent.inRope.rotSpeed = -_parent.inRope.rotSpeed;
}
function fGuide() {
var _local1 = _root;
point.x = _local1.inRope.xypos._x;
point.y = _local1.inRope.xypos._y;
_local1.inRope.localToGlobal(point);
this._x = point.x;
this._y = point.y;
}
function fRopeSwing() {
var _local1 = _root;
if (((_local1.pMode == "reel") or (_local1.pMode == "ready")) or (_local1.pMode == "slidein")) {
_parent.inRope.fSetSwing();
}
}
function fGoldFrame() {
var _local2 = _parent;
_local2.inGoldPicked.fFrame();
_local2.inGoldFall.fFrame();
var _local1 = 0;
while (_local1 < _local2.pGold.length) {
_local2.pGold[_local1].fFrame();
_local1++;
}
_local1 = 0;
while (_local1 < _local2.pRocks.length) {
_local2.pRocks[_local1].fFrame();
_local1++;
}
}
function fMissed() {
_root.pMode = "missed";
_parent.inRope.inClaw.gotoAndStop("shut");
_parent.base.inManLever.fMove("up");
_root.inSFX.fNoise("twang");
}
this.point = new Object();
this._visible = 0;
pSelected = [];
pCount = 0;
pFlashPoint = 220;
pChangePoint = 250;
pStart = 70;
_root.pMode = "slidein";
pSpeedFactor = 0.6;
pDir = 0;
pAcc = 1.1;
pRopeLength = 1;
pRockPicked = undefined;
pWait = 0;
pLastSideKey = "none";
pLastRopex = 0;
pLastBasex = 0;
pRopeLengthMissedSpeed = 5;
}
onClipEvent (enterFrame) {
switch (_root.pMode) {
case "slidein" :
if (pStart == 65) {
_parent.base.inManLever.fMove("right");
}
if (pStart > 0) {
pStart--;
}
fMoveBase(1 * pSpeedFactor);
pDir = pDir * 0.9;
_root.base._x = _root.base._x + pDir;
if (_root.base._x > 200) {
fNextLevelReady2();
}
break;
case "ready" :
fCheckKeys();
fMoveBaseFrame();
break;
case "fire" :
fCheckRocks();
if (_root.pMode == "fire") {
pRopeLength = pRopeLength + 7;
_parent.inRope.gotoAndStop(Math.abs(pRopeLength));
if ((((_x > 550) or (_x < 0)) or (_y > 450)) or (pRopeLength >= 200)) {
fMissed();
}
}
break;
case "reel" :
fCheckKeys();
fMoveBaseFrame();
if (pRopeLength <= 1) {
_parent.inGoldPicked.fReset();
pRockPicked.fReeledIn();
_root.inScore.fAddScore(pRockPicked.pValue);
_parent.inScored.fScored(pRockPicked.pValue, point);
pRockPicked = undefined;
_root.pMode = "ready";
_parent.inRope.inClaw.gotoAndStop("open");
fCheckEnd();
_root.inSFX.fNoise("pickup");
}
break;
case "missed" :
pRopeLength = pRopeLength - pRopeLengthMissedSpeed;
_parent.inRope.gotoAndStop(Math.abs(pRopeLength));
if (pRopeLength <= 1) {
_root.pMode = "ready";
_parent.inRope.inClaw.gotoAndStop("open");
pRopeLengthMissedSpeed = 2;
fCheckEnd();
}
break;
case "fade" :
pWait--;
if (pWait == 0) {
fNextLevel();
_root.pMode = "next";
pLastRopex = _parent.inRope._x - 550;
pLastBasex = _parent.base._x - 550;
}
break;
case "next" :
if (_parent.base._x <= -100) {
break;
}
_parent.base._x = pLastBasex + _root.pSlideAdd;
_parent.inRope._x = pLastRopex + _root.pSlideAdd;
}
fRopeSwing();
fGuide();
fGoldFrame();
}
Instance of Symbol 147 MovieClip "inGoldPicked" in Frame 21
onClipEvent (load) {
pType = "movable";
}
Instance of Symbol 147 MovieClip "inGoldFall" in Frame 21
onClipEvent (load) {
pType = "movable";
}
Instance of Symbol 160 MovieClip "inRope" in Frame 21
onClipEvent (load) {
function fResetMomentum() {
rotSpeed = 0;
fSetSwing();
newX = oldX;
newY = oldY;
}
function fSetSwing() {
var _local2 = _root;
var _local3 = _parent.inKeys.pRopeLength;
var _local1 = 0.5 * _local3;
var tFact = (_local1 / 100);
var tFact2 = (1 - (_local1 / 100));
h = _height * 0.2;
_x = _local2.base._x;
_y = _local2.base._y;
newX = _x;
newY = _y;
xspeed = oldX - newX;
yspeed = oldY - newY;
oldX = newX;
oldY = newY;
point.x = xypos._x;
point.y = xypos._y;
localToGlobal(point);
xball = point.x - _local2.base._x;
g = -1.8;
a = (xball / h) * g;
rotSpeed = (((xspeed / 10) + rotSpeed) + a) * friction;
if (rotSpeed > tRotMax) {
rotSpeed = tRotMax;
}
if (rotSpeed < (-tRotMax)) {
rotSpeed = -tRotMax;
}
_rotation = (_rotation - (rotSpeed * (dampening - (0.7 * tFact))));
}
this.name = this._name;
this.len = this._name.length;
this.myname = name.slice(6);
this.txt = myname;
oldX = _x;
h = _height;
point = new Object();
friction = 0.98;
dampening = 0.7;
tRotMax = 6;
}
Frame 22
inSFX.sStopMusic();
pSection = "game";
stop();
Instance of Symbol 147 MovieClip in Frame 22
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 22
onClipEvent (load) {
}
Frame 24
stop();
Instance of Symbol 147 MovieClip in Frame 24
onClipEvent (load) {
}
Frame 26
stop();
Instance of Symbol 147 MovieClip in Frame 26
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 26
onClipEvent (load) {
}
Frame 28
stop();
Instance of Symbol 147 MovieClip in Frame 28
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 28
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 28
onClipEvent (load) {
}
Frame 30
stop();
Instance of Symbol 147 MovieClip in Frame 30
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 30
onClipEvent (load) {
}
Frame 32
inSFX.sStopMusic();
pSection = "game";
stop();
Instance of Symbol 147 MovieClip in Frame 32
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 32
onClipEvent (load) {
}
Frame 34
stop();
Instance of Symbol 147 MovieClip in Frame 34
onClipEvent (load) {
}
Frame 36
stop();
Instance of Symbol 147 MovieClip in Frame 36
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 36
onClipEvent (load) {
}
Frame 38
stop();
Instance of Symbol 147 MovieClip in Frame 38
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 38
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 38
onClipEvent (load) {
}
Frame 40
stop();
Instance of Symbol 147 MovieClip in Frame 40
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 40
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 40
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 40
onClipEvent (load) {
}
Frame 42
stop();
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 42
onClipEvent (load) {
}
Frame 44
stop();
Instance of Symbol 147 MovieClip in Frame 44
onClipEvent (load) {
}
Frame 46
stop();
Instance of Symbol 147 MovieClip in Frame 46
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 46
onClipEvent (load) {
}
Frame 48
stop();
Instance of Symbol 147 MovieClip in Frame 48
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 48
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 48
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 48
onClipEvent (load) {
}
Frame 50
pLastLevel = true;
stop();
Instance of Symbol 147 MovieClip in Frame 50
onClipEvent (load) {
}
Instance of Symbol 147 MovieClip in Frame 50
onClipEvent (load) {
}
Frame 52
stop();
Frame 53
scoretxt = "$" + score;
_root.inSFX.fNoise("end");
Frame 56
stop();
Instance of Symbol 216 MovieClip "comHighscores" in Frame 59
//component parameters
onClipEvent (initialize) {
scoreLocation = "_root.score";
gamename = "cokefootball";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 62
stop();
Symbol 5 MovieClip Frame 1
this._visible = false;
Symbol 11 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 16 MovieClip Frame 1
pushSWF1 = "http://www.miniclip.com/swfcontent/push/didyouknow.swf";
totalAds = 1;
gotoAndPlay ("ReadCookie");
Symbol 16 MovieClip Frame 9
so = SharedObject.getLocal("MiniclipLoaderAd");
showThisAd = so.data.showThisAd + 1;
if (showThisAd > totalAds) {
showThisAd = 1;
}
so.data.showThisAd = showThisAd;
gotoAndPlay ("prepareAd");
Symbol 16 MovieClip Frame 20
doReadCookie();
showAd = ((this["pushSWF" + showThisAd] + "?cacheBuster=") + getTimer()) + random(999999);
gotoAndPlay ("loadAd");
Symbol 16 MovieClip Frame 31
if (_url.indexOf("http") > -1) {
trace("trying to load ad: " + showAd);
mcAd.loadMovie(showAd);
}
mcCookie.doWriteCookie(showThisAd);
Symbol 16 MovieClip Frame 33
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
lastAdShown = showThisAd;
doWriteCookie();
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 16 MovieClip Frame 41
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 100
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 32 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 33 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 33 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 60
Symbol 47 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 48 MovieClip Frame 1
_root.stop();
play();
Instance of Symbol 5 MovieClip "mcIntro" in Symbol 48 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 48 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 28 MovieClip "mcLoadingAnimated" in Symbol 48 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 48 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
mcLoadingAnimated._visible = true;
}
Symbol 48 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 70 MovieClip Frame 1
gotoAndStop(random(3) + 2);
Symbol 76 MovieClip Frame 15
Symbol 77 MovieClip Frame 1
gotoAndPlay (2);
Symbol 77 MovieClip Frame 49
stop();
Symbol 84 Button
on (press) {
gotoAndPlay ("game");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 88 Button
on (press) {
gotoAndPlay ("instruct");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 90 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 106 MovieClip Frame 1
function fSJxxx(tVal) {
var _local1 = tVal;
if (_local1 != pJMode) {
switch (_local1) {
case "on" :
if (pOn == true) {
sJetOn.onSoundComplete = function () {
sJetLoop.start(0, 99);
};
sJetOn.setVolume(70);
sJetOn.start(0, 1);
pJMode = _local1;
}
return;
case "off" :
sJetLoop.stop();
if (pOn != true) {
break;
}
sJetOff.setVolume(70);
sJetOff.start(0, 1);
pJMode = _local1;
}
}
}
function fNoise(which) {
var _local1 = which;
if (pOn == true) {
if (_local1 == "click") {
sTink.start();
} else if (_local1 == "fire") {
sFire.start();
} else if (_local1 == "twang") {
sTwang.start();
} else if (_local1 == "pick") {
sTink2.start();
} else if (_local1 == "hit") {
sTink3.start();
} else if (_local1 == "pickhit") {
sTink3.start();
sFall.start();
} else if (_local1 == "pickup") {
sPickup2.start();
} else if (_local1 == "newgold") {
sPickup.start();
} else if (_local1 == "end") {
sEndMusic.start();
} else if (_local1 == "bell") {
sCowbell.start();
}
}
}
function sWinMusic() {
if (pOn == true) {
sDrums.stop();
sLoop.stop();
sLose.stop();
sWin.stop();
sWin.start();
}
}
function sLoseMusic() {
if (pOn == true) {
sDrums.stop();
sLoop.stop();
sLose.stop();
sWin.stop();
sLose.start();
}
}
function sMusic() {
if (pOn == true) {
sReelGoldLoop.stop();
sReelGoldLoop.setVolume(100);
sReelGoldLoop.start();
sReelGoldLoop.onSoundComplete = function () {
sReelGoldLoop.start();
};
}
}
function sStopMusic() {
if (pOn == true) {
sReelGoldLoop.stop();
}
}
function fMainSoundSwitch(which) {
var _local1 = _root;
if (which == "on") {
pOn = true;
if (_local1.pSection == "menu") {
sMusic();
} else if (_local1.pSection == "game") {
} else if (_local1.pSection == "ready") {
sDrumsMusic();
}
} else {
sStopMusic();
pOn = false;
}
}
pOn = true;
this.createEmptyMovieClip("insCowbell", 1);
var sCowbell = new Sound(this.insCowbell);
sCowbell.attachSound("sCowbell.wav");
sCowbell.setVolume(100);
this.createEmptyMovieClip("insFire", 2);
var sFire = new Sound(this.insFire);
sFire.attachSound("sFire.wav");
sFire.setVolume(100);
this.createEmptyMovieClip("insTink", 3);
var sTink = new Sound(this.insTink);
sTink.attachSound("sTink.wav");
sTink.setVolume(100);
this.createEmptyMovieClip("insTink2", 4);
var sTink2 = new Sound(this.insTink2);
sTink2.attachSound("sTink2.wav");
sTink2.setVolume(100);
this.createEmptyMovieClip("insTink3", 5);
var sTink3 = new Sound(this.insTink3);
sTink3.attachSound("sTink3.wav");
sTink3.setVolume(100);
this.createEmptyMovieClip("insTwang", 6);
var sTwang = new Sound(this.insTwang);
sTwang.attachSound("sTwang.wav");
sTwang.setVolume(100);
this.createEmptyMovieClip("insReelGoldLoop", 7);
var sReelGoldLoop = new Sound(this.insReelGoldLoop);
sReelGoldLoop.attachSound("sReelGoldLoop.wav");
sReelGoldLoop.setVolume(100);
this.createEmptyMovieClip("insPickup", 8);
var sPickup = new Sound(this.insPickup);
sPickup.attachSound("sPickup.wav");
sPickup.setVolume(45);
this.createEmptyMovieClip("insFall", 9);
var sFall = new Sound(this.insFall);
sFall.attachSound("sFall.wav");
sFall.setVolume(100);
this.createEmptyMovieClip("insEndMusic", 10);
var sEndMusic = new Sound(this.insEndMusic);
sEndMusic.attachSound("sEndMusic.wav");
sEndMusic.setVolume(100);
this.createEmptyMovieClip("insJetLoop", 11);
var sJetLoop = new Sound(this.insJetLoop);
sJetLoop.attachSound("JetLoop2.wav");
sJetLoop.setVolume(100);
this.createEmptyMovieClip("insJetOn", 12);
var sJetOn = new Sound(this.insJetOn);
sJetOn.attachSound("JetStart.wav");
sJetOn.setVolume(100);
this.createEmptyMovieClip("insJetOff", 13);
var sJetOff = new Sound(this.insJetOff);
sJetOff.attachSound("JetFinish.wav");
sJetOff.setVolume(100);
this.createEmptyMovieClip("insPickup2", 14);
var sPickup2 = new Sound(this.insPickup2);
sPickup2.attachSound("sPickup2.wav");
sPickup2.setVolume(100);
pJMode = "off";
pOn = true;
stop();
Symbol 108 Button
on (release) {
play();
_root.inSFX.fNoise("click");
pOn = false;
_root.inSFX.fMainSoundSwitch("off");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 109 Button
on (release) {
play();
pOn = true;
_root.inSFX.fMainSoundSwitch("on");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 111 MovieClip Frame 1
stop();
if (pOn == true) {
} else if (pOn == false) {
} else {
pOn = true;
}
Symbol 111 MovieClip Frame 2
stop();
Symbol 115 Button
on (press) {
gotoAndPlay ("menu2");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 123 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 1
stop();
pActive = false;
_root.pSlideAdd = 0;
this.onEnterFrame = function () {
if (pActive == true) {
_root.pSlideAdd = inBG2._x;
}
};
Symbol 124 MovieClip Frame 2
pActive = true;
Symbol 124 MovieClip Frame 12
_root.inKeys.fAddLevel();
Symbol 124 MovieClip Frame 49
pActive = false;
_root.pSlideAdd = 0;
_root.inKeys.fNextLevelReady();
Symbol 130 MovieClip Frame 1
function fTimer() {
if (pActive == true) {
pFramecount++;
if (pFramecount >= 31) {
pTime--;
pFramecount = 0;
if (pTime == 10) {
gotoAndStop (3);
}
}
if (pTime == 0) {
_root.inKeys.fTimeup();
pActive = false;
}
}
}
function fNewTime(tTime) {
if (tTime == 0) {
pActive = false;
gotoAndStop (4);
} else {
pActive = true;
pTime = tTime;
gotoAndStop (2);
}
}
pFramecount = 0;
pTime = "";
pActive = false;
this.onEnterFrame = function () {
fTimer();
};
gotoAndStop (4);
Symbol 130 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 3
stop();
Symbol 130 MovieClip Frame 4
stop();
Symbol 134 MovieClip Frame 1
function fAddScore(tScore) {
_root.score = _root.score + tScore;
}
Symbol 134 MovieClip Frame 2
stop();
Symbol 134 MovieClip Frame 3
stop();
Symbol 138 MovieClip Frame 1
gotoAndStop(random(3) + 2);
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 15
gotoAndPlay ("flash");
Symbol 144 MovieClip Frame 1
gotoAndStop(random(2) + 2);
Symbol 146 MovieClip Frame 1
_parent.fAddCollisionPoint({x:this._x * (_parent._xscale / 100), y:this._y * (_parent._yscale / 100)});
this._visible = false;
stop();
Symbol 147 MovieClip Frame 1
function fAddCollisionPoint(where) {
pCollisionPoints.push(where);
}
function fPickedUp() {
fMatch(this, pPickedMC);
pPickedMC.inGold.gotoAndStop(2);
pPicked = true;
gotoAndStop ("mud");
}
function fSetToFade() {
if (pPicked == "hit") {
pFallEnd = pHitMC;
} else if (pPicked == "fall") {
pFallEnd = pPickedMC;
}
pPicked = "fade";
}
function fReeledIn() {
pPicked = "off";
}
function fDrop(tSwitch) {
if (tSwitch == true) {
pPicked = "fall";
} else {
pPicked = "hit";
}
}
function fCheckRocks() {
var tHit = false;
var i = 0;
while (i < _parent.pRocks.length) {
var _local3 = _parent.pRocks[i];
var _local2 = _local3.pCollisionPoints;
var _local1 = 0;
while (_local1 < _local2.length) {
if (pPickedMC.inHit.hitTest(_local3._x + _local2[_local1].x, _local3._y + _local2[_local1].y, true)) {
_root.inSFX.fNoise("pickhit");
_parent.inHitEffect.fPlay({x:pPickedMC._x, y:pPickedMC._y});
tHit = true;
break;
}
_local1++;
}
if (tHit == true) {
break;
}
i++;
}
if (tHit == true) {
fCollide(this, _local3);
}
}
function fCollide(tfrom, tto) {
var _local1 = tto;
var _local2 = tfrom;
if (_local2.pPickedMC._x > _local1._x) {
_local2.pFallAddx = 5;
var _local3 = -5;
} else {
_local2.pFallAddx = -5;
var _local3 = 5;
}
_local2.fDrop(true);
if (_local1.pType != "rock") {
_local1.pFallAddx = _local3;
fMatch(_local1, _local2.pHitMC);
_local1.fDrop();
_local1.gotoAndStop("mud");
}
_parent.inKeys.fCollisionEnd(_local2, _local1);
}
function fMatch(tfrom, tto) {
var _local1 = tto;
var _local2 = tfrom;
_local1._x = _local2._x;
_local1._y = _local2._y;
_local1._rotation = _local2._rotation;
_local1._xscale = _local2._xscale;
_local1._yscale = _local2._yscale;
_local1.gotoAndStop(_local2._currentframe);
}
function fSetScale() {
this._xscale = pScale;
this._yscale = pScale;
}
function fFrame() {
var _local1 = this;
var _local2 = _parent;
switch (pPicked) {
case true :
pPickedMC._x = _local2.inKeys.point.x + pOffset.x;
pPickedMC._y = _local2.inKeys.point.y + pOffset.y;
pPickedMC._rotation = _local2.inRope._rotation;
fCheckRocks();
return;
case "fall" :
fFalling(pPickedMC);
return;
case "hit" :
fFalling(pHitMC);
return;
case "fade" :
_local1._alpha = _local1._alpha - 5;
if (pFallEnd != false) {
fFalling(pFallEnd);
}
if (_local1._alpha < 5) {
_local1._alpha = 0;
pPicked == "invisible";
}
return;
case "slidein" :
_local1._x = pStartXslide + _root.pSlideAdd;
}
}
function fFalling(who) {
var _local1 = who;
_local1._x = _local1._x + pFallAddx;
pFallAddx = pFallAddx * 0.95;
_local1._y = _local1._y + pFallAddy;
pFallAddy = pFallAddy + 1;
if (_local1._y > 800) {
_local1.fReset();
pPicked = "off";
}
}
function fReset() {
var _local1 = this;
_local1._x = pStartx;
_local1._y = pStarty;
_local1._rotation = 0;
pPicked = "rest";
gotoAndStop ("gold");
}
if (pType == "movable") {
inMud._visible = false;
pPicked = false;
} else {
_parent.fAddGold(this);
pStartXslide = this._x;
if (_root.pLevel > 0) {
this._x = this._x + 550;
pPicked = "slidein";
} else {
pPicked = false;
}
}
pHighlighted = false;
pCollisionPoints = [];
pFallEnd = false;
pRockHit = undefined;
pRockHitTime = 0;
pScale = this._xscale;
pValue = Math.floor(((pScale * 10) - 333) * 0.3);
fSetScale();
if (_y > 250) {
pSpeed = 0.4;
} else if (_y > 180) {
pSpeed = 0.6;
} else {
pSpeed = 0.8;
}
pOffset = {x:0, y:0};
pFallAddx = 0;
pFallAddy = 0;
pPickedMC = _parent.inGoldPicked;
pHitMC = _parent.inGoldFall;
pStartx = this._x;
pStarty = this._y;
Symbol 147 MovieClip Frame 2
stop();
Symbol 149 MovieClip Frame 1
function fMove(tMove) {
var _local1 = tMove;
if (pMove != _local1) {
if (_local1 == "off") {
play();
} else {
gotoAndPlay(_local1);
}
pMove = _local1;
}
}
stop();
pMove = "off";
Symbol 149 MovieClip Frame 4
stop();
Symbol 149 MovieClip Frame 7
pMove = "off";
stop();
Symbol 149 MovieClip Frame 10
stop();
Symbol 149 MovieClip Frame 13
pMove = "off";
stop();
Symbol 149 MovieClip Frame 16
stop();
Symbol 149 MovieClip Frame 19
pMove = "off";
stop();
Symbol 149 MovieClip Frame 22
stop();
Symbol 149 MovieClip Frame 25
pMove = "off";
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 9
stop();
Symbol 158 MovieClip Frame 1
stop();
inClaw.gotoAndPlay("open");
Symbol 158 MovieClip Frame 2
stop();
inClaw.gotoAndPlay("shut");
Symbol 160 MovieClip Frame 1
stop();
Instance of Symbol 154 MovieClip "xypos" in Symbol 160 MovieClip Frame 1
/* no clip actions */
Symbol 161 MovieClip Frame 1
play();
function fPlay(point) {
_x = point.x;
_y = point.y;
gotoAndPlay ("spark");
}
Symbol 161 MovieClip Frame 2
stop();
Symbol 161 MovieClip Frame 3
play();
Symbol 161 MovieClip Frame 4
play();
Symbol 161 MovieClip Frame 5
play();
Symbol 161 MovieClip Frame 6
play();
Symbol 161 MovieClip Frame 7
play();
Symbol 161 MovieClip Frame 8
play();
Symbol 161 MovieClip Frame 9
gotoAndStop ("blank");
Symbol 168 MovieClip Frame 5
_root.inSFX.fNoise("bell");
Symbol 168 MovieClip Frame 55
stop();
Symbol 168 MovieClip Frame 56
_root.inSFX.fNoise("end");
Symbol 168 MovieClip Frame 151
if (_root.pLastLevel != true) {
gotoAndPlay ("ready");
}
Symbol 168 MovieClip Frame 231
gotoAndStop ("wait");
Symbol 173 MovieClip Frame 1
function fScored(tScore, point) {
pScore = tScore;
_x = point.x;
_y = (point.y - 15);
pActive = true;
}
pScore = 0;
pActive = false;
this.onEnterFrame = function () {
if (pActive == true) {
_y = (_y - 2);
if (_y < -20) {
_y = -20;
pActive = false;
}
}
};
stop();
Symbol 178 MovieClip Frame 1
function fAddScore(tScore) {
pScore = tScore;
gotoAndPlay (2);
}
pScore = 0;
gotoAndStop ("blank");
Symbol 178 MovieClip Frame 64
_root.inScore.fAddScore(pScore);
Symbol 178 MovieClip Frame 107
stop();
Symbol 181 Button
on (press) {
gotoAndPlay ("menu");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 182 MovieClip Frame 1
function fAddCollisionPoint(where) {
pCollisionPoints.push(where);
}
function fSetToFade() {
pPicked = "fade";
}
function fCollide(tfrom, tto) {
var _local1 = tto;
var _local2 = tfrom;
if (_local2.pPickedMC._x > _local1._x) {
_local2.pFallAddx = 5;
var _local3 = -5;
} else {
_local2.pFallAddx = -5;
var _local3 = 5;
}
_local2.fDrop(true);
if (_local1.pType != "rock") {
_local1.pFallAddx = _local3;
fMatch(_local1, _local2.pHitMC);
_local1.fDrop();
_local1.gotoAndStop("mud");
}
_parent.inKeys.fCollisionEnd(_local2, _local1);
}
function fMatch(tfrom, tto) {
var _local1 = tto;
var _local2 = tfrom;
_local1._x = _local2._x;
_local1._y = _local2._y;
_local1._rotation = _local2._rotation;
_local1._xscale = _local2._xscale;
_local1._yscale = _local2._yscale;
_local1.gotoAndStop(_local2._currentframe);
}
function fSetScale() {
this._xscale = pScale;
this._yscale = pScale;
}
function fFrame() {
var _local1 = this;
switch (pPicked) {
case "fade" :
_local1._alpha = _local1._alpha - 5;
if (_local1._alpha < 5) {
_local1._alpha = 0;
pPicked == "invisible";
}
return;
case "slidein" :
_local1._x = pStartXslide + _root.pSlideAdd;
}
}
pType = "rock";
_parent.fAddRock(this);
gotoAndStop ("rock");
pStartXslide = this._x;
inHit._visible = false;
if (_root.pLevel > 0) {
this._x = this._x + 550;
pPicked = "slidein";
} else {
pPicked = false;
}
pCollisionPoints = [];
pScale = this._xscale;
fSetScale();
if (_y > 250) {
pSpeed = 0.4;
} else if (_y > 180) {
pSpeed = 0.6;
} else {
pSpeed = 0.8;
}
pOffset = {x:0, y:0};
pFallAddx = 0;
pFallAddy = 0;
pPickedMC = _parent.inGoldPicked;
pHitMC = _parent.inGoldFall;
pStartx = this._x;
pStarty = this._y;
Symbol 182 MovieClip Frame 2
stop();
Symbol 189 Button
on (press) {
gotoAndPlay ("highscores");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 190 Button
on (press) {
gotoAndPlay ("menu");
_root.inSFX.fNoise("click");
}
on (rollOver) {
_root.inSFX.fNoise("click2");
}
Symbol 196 MovieClip Frame 1
this._visible = false;
Symbol 214 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Instance of Symbol 196 MovieClip "mcHighscores" in Symbol 216 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 216 MovieClip Frame 2
if (_url.indexOf("miniclip.com") == -1) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 216 MovieClip Frame 3
stop();