Instance of Symbol 18 MovieClip in Frame 1
onClipEvent (load) {
if (_root.amLoaded) {
stop();
_visible = false;
}
}
Frame 2
stop();
Frame 3
fscommand ("showmenu", "false");
stopAllSounds();
checkWin = false;
ctr = 1;
while (ctr < 9) {
_root["ball" + ctr] = false;
ctr++;
}
Instance of Symbol 81 MovieClip "mcShells" in Frame 3
onClipEvent (load) {
function startGame() {
ctr = 1;
while (ctr <= 9) {
if (_root["ball" + ctr]) {
ballsplaced = true;
}
ctr++;
}
if (!ballsplaced) {
_root.txtScore.text = 0;
_root.txtLevel.text = 0;
ctr = 1;
while (ctr <= _root.NoofBalls) {
w = random(myPlace.length);
_root["ball" + myPlace[w]] = true;
this["s" + myPlace[w]].play();
myPlace.splice(w, 1);
ctr++;
}
}
currentLevel++;
_root.txtLevel.text = currentLevel;
times = 0;
mcMessage.gotoAndPlay("focus");
}
function nextFrames() {
if ((_currentframe + 1) > _totalframes) {
gotoAndStop (1);
} else {
gotoAndStop(_currentframe + 1);
updateAfterEvent();
}
}
ballsplaced = false;
mySpeed = 30;
myShuffle = 10;
currentLevel = 0;
ok = false;
myPlace = new Array(1, 2, 3, 4, 5, 6, 7, 8);
}
onClipEvent (enterFrame) {
if (ok && (_root.gameStarted)) {
times++;
ok = false;
if (times <= myShuffle) {
w = random(3);
if (w < 2) {
w = random(13) + 1;
_root.mcSoundboard.play();
if (w == 1) {
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = temp;
} else if (w == 2) {
temp = _root.ball3;
_root.ball3 = _root.ball2;
_root.ball2 = temp;
} else if (w == 3) {
temp = _root.ball4;
_root.ball4 = _root.ball3;
_root.ball3 = temp;
} else if (w == 4) {
temp = _root.ball2;
_root.ball2 = _root.ball3;
_root.ball3 = temp;
} else if (w == 5) {
temp = _root.ball6;
_root.ball6 = _root.ball5;
_root.ball5 = temp;
} else if (w == 6) {
temp = _root.ball7;
_root.ball7 = _root.ball6;
_root.ball6 = temp;
} else if (w == 7) {
temp = _root.ball8;
_root.ball8 = _root.ball7;
_root.ball7 = temp;
} else if (w == 8) {
temp = _root.ball6;
_root.ball6 = _root.ball7;
_root.ball7 = temp;
} else if (w == 9) {
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = temp;
temp = _root.ball3;
_root.ball3 = _root.ball4;
_root.ball4 = temp;
} else if (w == 10) {
temp = _root.ball5;
_root.ball5 = _root.ball6;
_root.ball6 = temp;
temp = _root.ball8;
_root.ball8 = _root.ball7;
_root.ball7 = temp;
} else if (w == 11) {
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = temp;
temp = _root.ball8;
_root.ball8 = _root.ball7;
_root.ball7 = temp;
} else if (w == 12) {
temp = _root.ball4;
_root.ball4 = _root.ball3;
_root.ball3 = temp;
temp = _root.ball6;
_root.ball6 = _root.ball5;
_root.ball5 = temp;
} else {
temp = _root.ball4;
_root.ball4 = _root.ball3;
_root.ball3 = temp;
temp = _root.ball6;
_root.ball6 = _root.ball7;
_root.ball7 = temp;
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = temp;
}
} else {
w = random(10) + 14;
_root.mcSoundboard.play();
if (w == 14) {
temp = _root.ball1;
_root.ball1 = _root.ball5;
_root.ball5 = temp;
} else if (w == 15) {
temp = _root.ball4;
_root.ball4 = _root.ball8;
_root.ball8 = temp;
} else if (w == 16) {
temp = _root.ball2;
_root.ball2 = _root.ball6;
_root.ball6 = temp;
} else if (w == 17) {
temp = _root.ball3;
_root.ball3 = _root.ball7;
_root.ball7 = temp;
} else if (w == 18) {
temp = _root.ball1;
_root.ball1 = _root.ball5;
_root.ball5 = temp;
temp = _root.ball3;
_root.ball3 = _root.ball7;
_root.ball7 = temp;
} else if (w == 19) {
temp = _root.ball2;
_root.ball2 = _root.ball6;
_root.ball6 = temp;
temp = _root.ball4;
_root.ball4 = _root.ball8;
_root.ball8 = temp;
} else if (w == 20) {
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = _root.ball5;
_root.ball5 = _root.ball6;
_root.ball6 = temp;
} else if (w == 21) {
temp = _root.ball4;
_root.ball4 = _root.ball3;
_root.ball3 = _root.ball7;
_root.ball7 = _root.ball8;
_root.ball8 = temp;
} else if (w == 22) {
temp = _root.ball2;
_root.ball2 = _root.ball1;
_root.ball1 = _root.ball5;
_root.ball5 = _root.ball6;
_root.ball6 = temp;
temp = _root.ball4;
_root.ball4 = _root.ball8;
_root.ball8 = temp;
} else {
temp = _root.ball4;
_root.ball4 = _root.ball3;
_root.ball3 = _root.ball7;
_root.ball7 = _root.ball8;
_root.ball8 = temp;
temp = _root.ball1;
_root.ball1 = _root.ball5;
_root.ball5 = temp;
}
}
gotoAndStop("f" + w);
gotoAndStop(_currentframe + 1);
myID = setInterval(nextFrames, mySpeed);
} else {
_root.gameStarted = false;
clearInterval(myID);
ok = true;
gotoAndStop (1);
if (_root.NoofBalls == 1) {
mcMessage.gotoAndPlay("choose1");
} else {
mcMessage.gotoAndPlay("choose2");
}
correct = 0;
openShells = 0;
taken = false;
ctr = 1;
while (ctr < 9) {
this["s" + ctr].onRelease = function () {
_root.mcSoundboard.gotoAndPlay("ping");
if (_root["ball" + this._name.substr(1, 1)]) {
this.mcBall._visible = true;
this.mcBall.gotoAndStop(1);
correct++;
this.play();
} else {
myW = random(50);
if ((myW < 10) && (!taken)) {
this.mcBall._visible = true;
this.mcBall.gotoAndStop(2);
taken = true;
} else {
this.mcBall._visible = false;
this.mcBall.gotoAndStop(1);
}
this.play();
}
openShells++;
delete this.onRelease;
};
ctr++;
}
}
}
if (openShells == _root.NoofBalls) {
openShells = 0;
ctr = 1;
while (ctr < 9) {
delete this["s" + ctr].onRelease;
ctr++;
}
if (correct == _root.NoofBalls) {
_root.txtScore.text = Number(_root.txtScore.text) + (correct * 50);
mcMessage.gotoAndPlay("correct");
} else if (correct > 0) {
currentLevel--;
mySpeed--;
myShuffle = myShuffle - 10;
_root.txtScore.text = Number(_root.txtScore.text) + (correct * 50);
mcMessage.gotoAndPlay("1correct");
} else {
currentLevel--;
mySpeed--;
myShuffle = myShuffle - 10;
mcMessage.gotoAndPlay("wrong");
}
}
}
Instance of Symbol 119 MovieClip "mcCows" in Frame 3
onClipEvent (load) {
Ready = false;
fin = false;
}
onClipEvent (enterFrame) {
if ((((Number(_root.txtLevel.text) > 2) && (ok)) && (!Ready)) && (_root.mcShells.times > 10)) {
ok = false;
play();
}
if (((((Number(_root.txtLevel.text) % 2) == 0) && ((_root.mcShells.times % 30) == 0)) && ((_root.mcShells.times - 29) > 0)) && (ok)) {
if (Number(_root.txtLevel.text) > 3) {
w = random(6) + 1;
ok = false;
if ((!fin) && (w == 3)) {
fin = true;
gotoAndPlay("c" + w);
} else {
gotoAndPlay("c" + w);
}
}
}
}
Instance of Symbol 126 MovieClip "mcRemaining" in Frame 3
onClipEvent (load) {
gotoAndStop (4);
}
Symbol 14 MovieClip Frame 1
function setValue(v) {
mv = (v / 100) * 144;
}
var mv = 0;
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.thebar._x < _parent.mv) {
if ((_parent.mv - _parent.thebar._x) >= 2) {
_parent.thebar._x = _parent.thebar._x + 2;
} else {
_parent.thebar._x++;
}
}
}
Symbol 18 MovieClip Frame 4
tb = _root.getBytesTotal();
lb = _root.getBytesLoaded();
v = int((lb / tb) * 100);
thebar.setValue(v);
if (lb < tb) {
gotoAndPlay(_currentframe - 1);
} else if (thebar.mv == thebar.thebar._x) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 18 MovieClip Frame 88
_visible = false;
_root.amLoaded = true;
stop();
Symbol 32 Button
on (release) {
_root.NoofBalls = 1;
gotoAndStop (3);
}
Symbol 35 Button
on (release) {
_root.NoofBalls = 2;
gotoAndStop (3);
}
Symbol 38 Button
on (release) {
_root.NoofBalls = 3;
gotoAndStop (3);
}
Symbol 40 Button
on (release) {
_root.NoofBalls = 4;
gotoAndStop (3);
}
Symbol 44 Button
on (release) {
getURL ("http://www.funflashgames.com", "_blank");
}
Symbol 48 Button
on (release) {
getURL ("http://www.funflashgames.com/pages/FreeContent.htm", "_blank");
}
Symbol 54 Button
on (release) {
_parent.play();
_root.mcShells.startGame();
}
Symbol 58 Button
on (release) {
_parent._parent.myShuffle = _parent._parent.myShuffle + 10;
if (_parent._parent.mySpeed > 13) {
_parent._parent.mySpeed--;
}
_parent.play();
ctr = 1;
while (ctr < 9) {
if (_root["ball" + ctr]) {
_parent._parent["s" + ctr].gotoAndPlay(36);
}
ctr++;
}
}
Symbol 67 MovieClip Frame 20
stop();
Symbol 67 MovieClip Frame 41
stop();
Symbol 67 MovieClip Frame 60
stop();
Symbol 67 MovieClip Frame 76
stop();
Symbol 67 MovieClip Frame 95
stop();
Symbol 67 MovieClip Frame 115
stop();
Symbol 67 MovieClip Frame 181
gotoAndPlay ("getReady");
Symbol 67 MovieClip Frame 230
stop();
_root.checkWin = true;
ctr = 1;
while (ctr < 9) {
if (!_root["ball" + ctr]) {
if (_parent["s" + ctr]._currentframe != 1) {
_parent["s" + ctr].gotoAndPlay(36);
}
} else if (_parent["s" + ctr]._currentframe == 1) {
_parent["s" + ctr].mcBall._visible = true;
_parent["s" + ctr].mcBall.gotoAndStop(1);
_parent["s" + ctr].play();
}
ctr++;
}
play();
Symbol 67 MovieClip Frame 246
stop();
_root.checkWin = false;
_root.mcRemaining.gotoAndStop(_root.mcRemaining._currentframe - 1);
if (_root.mcRemaining._currentframe == 1) {
gotoAndPlay ("gameover");
} else {
gotoAndPlay ("getReady");
}
Symbol 67 MovieClip Frame 295
stop();
_root.checkWin = true;
ctr = 1;
while (ctr < 9) {
if (!_root["ball" + ctr]) {
if (_parent["s" + ctr]._currentframe != 1) {
_parent["s" + ctr].gotoAndPlay(36);
}
} else if (_parent["s" + ctr]._currentframe == 1) {
_parent["s" + ctr].mcBall._visible = true;
_parent["s" + ctr].mcBall.gotoAndStop(1);
_parent["s" + ctr].play();
}
ctr++;
}
play();
Symbol 67 MovieClip Frame 311
stop();
_root.checkWin = false;
_root.mcRemaining.gotoAndStop(_root.mcRemaining._currentframe - 1);
if (_root.mcRemaining._currentframe == 1) {
gotoAndPlay ("gameover");
} else {
gotoAndPlay ("getReady");
}
Symbol 67 MovieClip Frame 330
_root.mcSoundboard.gotoAndPlay("gameover");
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 35
stop();
Symbol 80 MovieClip Frame 51
if (!_root.checkWin) {
_root.gameStarted = true;
ok = true;
}
mcBall._visible = true;
Symbol 81 MovieClip Frame 1
ok = true;
stop();
Symbol 81 MovieClip Frame 15
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 30
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 45
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 60
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 75
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 90
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 105
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 120
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 135
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 150
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 165
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 180
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 195
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 210
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 225
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 240
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 255
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 270
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 285
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 300
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 315
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 330
clearInterval(myID);
ok = true;
stop();
Symbol 81 MovieClip Frame 345
clearInterval(myID);
ok = true;
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 3
gotoAndStop (1);
Symbol 85 MovieClip Frame 6
gotoAndStop (1);
Symbol 85 MovieClip Frame 9
gotoAndStop (1);
Symbol 119 MovieClip Frame 1
ok = true;
stop();
Symbol 119 MovieClip Frame 78
Ready = true;
gotoAndStop (1);
Symbol 119 MovieClip Frame 177
gotoAndStop (1);
Symbol 119 MovieClip Frame 371
gotoAndStop (1);
Symbol 119 MovieClip Frame 583
gotoAndStop (1);
Symbol 119 MovieClip Frame 687
gotoAndStop (1);
Symbol 119 MovieClip Frame 741
gotoAndStop (1);
Symbol 119 MovieClip Frame 876
gotoAndStop (1);
Symbol 128 Button
on (release) {
clearInterval(mcShells.myID);
gameStarted = false;
gotoAndStop (2);
}