Frame 2
stop();
Symbol 10 Button
on (release) {
_root.play();
}
Symbol 11 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 21 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 31 Button
on (release) {
this.actions.showgameover("You Quit");
}
on (press) {
this.actions.doclick();
}
Symbol 34 Button
on (release) {
this.actions.soundcontrol();
}
on (press) {
this.actions.doclick();
}
Instance of Symbol 119 MovieClip "fruit" in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 252 MovieClip Frame 26
removeMovieClip(this);
Symbol 291 MovieClip Frame 1
if (freeze == 1) {
freeze = 0;
stop();
_parent.numberbox.stop();
}
Symbol 297 Button
on (release) {
_parent._parent.actions.processclicked(_parent._name);
}
Symbol 298 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 6
_parent.actions.shootfruit(["b" + depth], fruit, fspot);
Symbol 299 MovieClip Frame 11
_rotation = 0;
_parent.actions.movefromto(["b" + depth], "spotg", 18);
Symbol 338 MovieClip Frame 1
if (freeze == 1) {
freeze = 0;
stop();
_parent.numberbox.stop();
}
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 6
_parent.actions.shootfruit(["b" + depth], fruit, fspot);
Symbol 339 MovieClip Frame 11
_rotation = 0;
_parent.actions.movefromto(["b" + depth], "spotg", 18);
Symbol 378 MovieClip Frame 1
if (freeze == 1) {
freeze = 0;
stop();
_parent.numberbox.stop();
}
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 6
_parent.actions.shootfruit(["b" + depth], fruit, fspot);
Symbol 379 MovieClip Frame 11
_rotation = 0;
_parent.actions.movefromto(["b" + depth], "spotg", 18);
Symbol 418 MovieClip Frame 1
if (freeze == 1) {
freeze = 0;
stop();
_parent.numberbox.stop();
}
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 6
_parent.actions.shootfruit(["b" + depth], fruit, fspot);
Symbol 419 MovieClip Frame 11
_rotation = 0;
_parent.actions.movefromto(["b" + depth], "spotg", 18);
Symbol 458 MovieClip Frame 1
if (freeze == 1) {
freeze = 0;
stop();
_parent.numberbox.stop();
}
Symbol 459 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 6
_parent.actions.shootfruit(["b" + depth], fruit, fspot);
Symbol 459 MovieClip Frame 11
_rotation = 0;
_parent.actions.movefromto(["b" + depth], "spotg", 18);
Symbol 466 MovieClip Frame 49
removeMovieClip(this);
Symbol 474 Button
on (release) {
_parent.actions.setnewcurrent();
}
on (press) {
this.sign.play();
_parent.actions.doclick();
}
Symbol 485 MovieClip Frame 1
stop();
Symbol 489 MovieClip Frame 1
stop();
Symbol 490 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 1
stop();
Symbol 496 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 499 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 1
stop();
Symbol 503 MovieClip Frame 1
stop();
Symbol 505 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 6
stop();
Symbol 512 MovieClip Frame 12
gotoAndStop (1);
Symbol 512 MovieClip Frame 25
gotoAndStop (6);
Symbol 521 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 537 MovieClip Frame 1
stop();
Symbol 537 MovieClip Frame 85
stopme();
_parent.actions.startnextlevel();
Symbol 541 MovieClip Frame 1
stop();
Symbol 541 MovieClip Frame 4
_parent.nextone();
Symbol 554 MovieClip Frame 16
removeMovieClip(this);
Symbol 559 Button
on (release) {
_parent.play();
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 569 Button
on (release) {
getURL ("http://www.tornadogames.com/?source=JungleFruit-ON", "_blank");
}
Symbol 570 Button
on (release) {
getURL ("http://www.jetacer.com", "_blank");
}
Symbol 575 Button
on (press) {
movepage(this._ymouse);
}
Symbol 577 Button
on (press) {
if (this._name == "slidebox") {
this.startDrag(1, this._x, 0, this._x, _parent.theight);
}
_parent.wname = _name;
_parent.pressing = 1;
}
on (release) {
_parent.pressing = 0;
if (this._name == "slidebox") {
stopDrag();
}
}
Instance of Symbol 573 MovieClip "barheight" in Symbol 580 MovieClip Frame 1
onClipEvent (load) {
_visible = 0;
}
Instance of Symbol 580 MovieClip in Symbol 581 MovieClip Frame 1
onClipEvent (load) {
function setto() {
this.slidebox._y = tracking;
_parent[focus]._y = topy - (tracking * ratio);
}
function settobox() {
tracking = this.slidebox._y;
setto();
}
function scrolling(dir) {
tracking = tracking + ((dir * multi) * smallstep);
if (tracking < 0) {
tracking = 0;
}
if (tracking > theight) {
tracking = theight;
}
setto();
}
function movepage(ty) {
if (ty > tracking) {
dir = 1;
} else {
dir = -1;
}
tracking = tracking + ((dir * multi) * bigstep);
if (tracking < 0) {
tracking = 0;
}
if (tracking > theight) {
tracking = theight;
}
setto();
}
pressing = 0;
focus = "helptext";
topy = _parent[focus]._y;
bottomy = _parent[focus]._y + _parent[focus]._height;
theight = this.barheight._height;
fheight = _parent[focus]._height - 150;
ratio = fheight / theight;
tracking = 0;
setto();
multi = 1;
times = 3;
smallstep = 1;
bigstep = 50;
}
onClipEvent (enterFrame) {
if (pressing == 1) {
if (wname eq "bottombox") {
scrolling(1);
} else if (wname eq "topbox") {
scrolling(-1);
} else {
settobox();
}
}
}
Symbol 582 MovieClip Frame 1
stop();
Instance of Symbol 581 MovieClip in Symbol 582 MovieClip Frame 2
onClipEvent (load) {
this.instructions.gotoAndStop(1);
}
Symbol 582 MovieClip Frame 7
stop();
Symbol 582 MovieClip Frame 13
gotoAndStop (1);
Symbol 589 MovieClip Frame 1
stop();
Symbol 590 MovieClip Frame 1
stop();
Symbol 609 Button
on (release) {
this.gotoAndStop(1);
_parent.play();
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 611 Button
on (release) {
getURL ("http://www.tornadogames.com/store/productdetails.phtml?pid=72A", "_blank");
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 613 Button
on (release) {
getURL ("http://www.tornadogames.com/store/downloaddemo.phtml?pid=72A", "_blank");
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 615 Button
on (release) {
getURL ("http://www.tornadogames.com/?source=jf_newgrounds", "_blank");
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 622 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 11
stop();
Symbol 628 MovieClip Frame 18
_parent.actions.resumegame();
gotoAndStop (1);
Symbol 630 Button
on (release) {
_parent.gamelayout = "Normal";
_parent.play();
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 632 Button
on (release) {
_parent._parent.actions.showhelp();
}
on (press) {
_parent._parent.actions.doclick();
}
Symbol 637 Button
on (press) {
_parent._parent._parent.actions.doclick();
}
on (release) {
if (_currentframe == 1) {
this.gotoAndStop(2);
_parent._parent._parent.actions.tutoron = 0;
} else {
this.gotoAndStop(1);
_parent._parent._parent.actions.tutoron = 1;
}
}
on (rollOver, dragOver) {
_parent._parent._parent.actions.forcemouseon = 1;
}
on (rollOut, dragOut) {
_parent._parent._parent.actions.forcemouseon = 0;
}
Instance of Symbol 639 MovieClip "tutorstatus" in Symbol 647 MovieClip Frame 1
onClipEvent (load) {
temp = _name;
trace("Tutor on: " + _parent._parent._parent.actions.tutoron);
if (_parent._parent._parent.actions.tutoron == 1) {
this.gotoAndStop(1);
} else {
gotoAndStop (2);
}
}
Symbol 648 MovieClip Frame 1
if (stopped == 1) {
stop();
} else {
stopped = 1;
play();
}
Symbol 648 MovieClip Frame 11
stop();
Symbol 648 MovieClip Frame 18
_parent.actions.startgame(gamelayout);
gotoAndStop (1);
Symbol 650 MovieClip Frame 1
stop();
Symbol 650 MovieClip Frame 11
stop();
Symbol 650 MovieClip Frame 18
_parent.actions.showmenu();
gotoAndStop (1);
Symbol 658 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 23
_parent.actions.setnewcurrent(-1, -1);
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 3
stop();
Symbol 667 MovieClip Frame 7
stop();
Symbol 677 MovieClip Frame 14
stop();
Symbol 678 Button
on (release) {
nextFrame();
stop();
}
on (press) {
_parent.actions.doclick();
}
Symbol 680 Button
on (release) {
_parent.actions.tutoron = 0;
_parent.actions.inmotion = 0;
this.gotoAndStop(1);
}
on (press) {
_parent.actions.doclick();
}
Symbol 691 MovieClip Frame 1
stop();
Symbol 694 Button
on (release) {
this._visible = 0;
}
on (press) {
_parent.actions.doclick();
}
Symbol 700 Button
on (press) {
startDrag (this, false, lowx, thisy, highx, thisy);
}
on (release) {
stopDrag();
}
Instance of Symbol 701 MovieClip in Symbol 702 MovieClip Frame 1
onClipEvent (load) {
function adjustvolume() {
vol = this._x - lowx;
vol = int(100 * (vol / totallength));
soundcontrol.setVolume(vol);
lastx = this._x;
}
lastx = -1;
soundcontrol = new Sound(_parent._parent._parent.soundfx);
vol = 80;
lowx = this._x;
highx = (this._x + _parent.vline._width) - 5;
thisy = this._y;
totallength = highx - lowx;
this._x = this._x + (totallength * (vol / 100));
adjustvolume();
}
onClipEvent (enterFrame) {
if (lastx != this._x) {
adjustvolume();
}
}
Symbol 705 MovieClip Frame 1
stop();
Symbol 706 MovieClip Frame 1
function endgame1(score) {
var _local1 = score;
mess = mess + (("Score in: " + _local1) + " ");
mess = mess + (("grab_cccode: " + grab_ccode) + " ");
_local1 = _local1.toString();
scoreEncoded = Grab_encode(_local1);
mess = mess + (("Score Encode: " + scoreEncoded) + " ");
mess = mess + (((((("javascript:reportGameScore('" + gameIDencoded) + "', '") + scoreEncoded) + "', '") + grab_ccode) + "')");
getURL (((((("javascript:reportGameScore('" + gameIDencoded) + "', '") + scoreEncoded) + "', '") + grab_ccode) + "')");
}
function dochallenge() {
getURL ("javascript:submitChallenge()");
}
function Grab_decode(toDecode) {
if ((toDecode == undefined) || (toDecode == "")) {
return("");
}
Grab_equalSign = false;
var _local1 = new Array();
_local1 = Base64toBinary(toDecode);
var _local2 = "decode";
var _local3 = XOR_decode(_local2, _local1, secWord);
return(_local3);
}
function Grab_encode(toEncode) {
mess = mess + (("To Encode: " + toEncode) + " ");
var _local2 = "encode";
var _local1 = new Array();
_local1 = XOR_encode(_local2, toEncode, secWord);
mess = mess + (("Code Array: " + _local1) + " ");
var _local3 = intToBin_enc(_local1);
return(_local3);
}
function encodeBase64(n) {
var _local1 = base64.charAt(n);
return(_local1);
}
function XOR_encode(code, myString, secWord) {
var len = (myString.length - 1);
var secLen = (secWord.length - 1);
var _local2 = -1;
var _local3;
var charString;
var foo;
var xor_enc_array = new Array();
var _local1 = 0;
while (_local1 <= len) {
_local2++;
if (_local2 > secLen) {
_local2 = 0;
}
_local3 = secWord.charCodeAt(_local2);
charString = myString.charCodeAt(_local1);
foo = _local3 ^ charString;
xor_enc_array[_local1] = foo;
_local1++;
}
return(xor_enc_array);
}
function XOR_decode(code, myArray, secWord) {
var len = (myArray.length - 1);
var secLen = (secWord.length - 1);
var _local2 = -1;
var _local3;
var charString;
var foo;
var encoded = "";
var xor_enc_array = new Array();
var _local1 = 0;
while (_local1 <= len) {
_local2++;
if (_local2 > secLen) {
_local2 = 0;
}
_local3 = secWord.charCodeAt(_local2);
charString = myArray[_local1];
foo = _local3 ^ charString;
encoded = encoded + String.fromCharCode(foo);
_local1++;
}
if (Grab_equalSign) {
encoded = encoded.substring(0, len);
}
return(encoded);
}
function toBinary(val) {
var _local1 = val;
var _local3 = "";
var _local2;
var p;
var bit = 0;
while (bit < 8) {
_local2 = _local1 % 2;
_local2 = _local2.toString();
p = _local2.indexOf(".");
if (p != -1) {
_local2 = _local2.substring(0, p);
}
_local2 = Number(_local2);
if (_local2 == 0) {
_local3 = _local3 + "0";
} else {
_local3 = _local3 + "1";
}
_local1 = _local1 / 2;
_local1 = _local1.toString();
p = _local1.indexOf(".");
if (p != -1) {
_local1 = _local1.substring(0, p);
}
_local1 = Number(_local1);
bit++;
}
var tmp = _local3;
_local3 = "";
var i = 7;
while (i >= 0) {
_local3 = _local3 + tmp.slice(i, i + 1);
i--;
}
return(_local3);
}
function intToBin_enc(codedArray) {
var len = (codedArray.length - 1);
var _local2;
var _local3;
var binString = "";
var _local1 = 0;
while (_local1 <= len) {
_local2 = codedArray[_local1];
_local3 = toBinary(_local2);
binString = binString + _local3;
_local1++;
}
var out = binToBase64(binString);
return(out);
}
function binToBase64(bin) {
var len = bin.length;
var j = 0;
var _local2 = new Array();
var z = 0;
var Base64OutString;
var i = 0;
while (i <= (len - 1)) {
if (j < 6) {
j++;
} else {
j = 1;
z++;
}
if (_local2[z] == undefined) {
_local2[z] = "";
}
_local2[z] = _local2[z] + bin.charAt(i);
i++;
}
if (j == 2) {
needed = 2;
}
if (j == 6) {
needed = 0;
}
if (j == 4) {
needed = 1;
}
var binLen = _local2.length;
var _local1 = 0;
while (_local1 <= (binLen - 1)) {
var elemLen = (_local2[_local1].length - 1);
if (elemLen < 5) {
var addN = (4 - elemLen);
var _local3 = 0;
while (_local3 <= addN) {
if (_local2[_local1] == undefined) {
_local2[_local1] = "";
}
_local2[_local1] = _local2[_local1] + "0";
_local3++;
}
}
_local1++;
}
var out = bin6ToInt(_local2, needed);
return(out);
}
function bin6ToInt(myArray, needed) {
var len = myArray.length;
var n;
var _local2;
var outArray = new Array();
var t = 0;
var digit;
var binLen;
var Base64OutString = "";
var _local1 = 0;
while (_local1 <= (len - 1)) {
n = myArray[_local1];
outArray[_local1] = 0;
digitVal = 1;
binLen = n.length;
var _local3 = binLen - 1;
while (_local3 >= 0) {
_local2 = n.charAt(_local3);
_local2 = Number(_local2);
_local2 = _local2 * digitVal;
if (outArray[_local1] == undefined) {
outArray[_local1] = "";
}
outArray[_local1] = outArray[_local1] + _local2;
digitVal = digitVal * 2;
_local3--;
}
Base64OutString = Base64OutString + encodeBase64(outArray[_local1]);
_local1++;
}
var kk = needed;
while (kk >= 1) {
Base64OutString = Base64OutString + "-";
kk--;
}
return(Base64OutString);
}
function Base64toBinary(sentText) {
var _local3;
var _local2 = new Array();
var binString = "";
var _local1 = 0;
while (_local1 <= (sentText.length - 1)) {
_local3 = sentText.charAt(_local1);
if (_local3 != "-") {
_local2[_local1] = decodeBase64(_local3);
_local2[_local1] = toBinary(_local2[_local1]);
_local2[_local1] = _local2[_local1].substring(2);
binString = binString + _local2[_local1];
} else {
Grab_equalSign = true;
}
_local1++;
}
var decodedArray = new Array();
decodedArray = sixToEightBit(binString);
return(decodedArray);
}
function sixToEightBit(binString) {
var j = 0;
var _local2 = 0;
var _local3 = new Array();
var len = (binString.length - 1);
var _local1 = 0;
while (_local1 <= len) {
if (j < 8) {
j++;
} else {
j = 1;
_local2++;
}
var char = binString.charAt(_local1);
if (_local3[_local2] == undefined) {
_local3[_local2] = "";
}
_local3[_local2] = _local3[_local2] + char;
_local1++;
}
var decodedArray = new Array();
decodedArray = binToInt8(_local3, 0);
return(decodedArray);
}
function binToInt8(myArray, needed) {
var len = myArray.length;
var n;
var _local1;
var outArray = new Array();
var k;
var digit;
var binLen;
var decoded;
var digitVal;
var _local2 = 0;
while (_local2 <= (len - 1)) {
n = myArray[_local2];
digitVal = 1;
binLen = n.length;
var _local3 = binLen - 1;
while (_local3 >= 0) {
_local1 = n.charAt(_local3);
_local1 = Number(_local1);
_local1 = _local1 * digitVal;
if (outArray[_local2] == undefined) {
outArray[_local2] = 0;
}
outArray[_local2] = outArray[_local2] + _local1;
digitVal = digitVal * 2;
_local3--;
}
_local2++;
}
return(outArray);
}
function intToText(decodedArray) {
var len = (decodedArray.length - 1);
var _local3 = "";
var _local2;
var _local1 = 0;
while (_local1 <= len) {
_local2 = decodedArray[_local1];
_local3 = _local3 + String.fromCharCode(_local2);
_local1++;
}
return(_local3);
}
function decodeBase64(c) {
var _local1 = base64.indexOf(c);
return(_local1);
}
secWord = "4bd240650da7831b875fbdf5cbf03963b75c";
gameID = "A5E26873-B060-4949-BD05-891A3A104B99";
mess = ("Gameid: " + gameID) + " ";
gameIDencoded = Grab_encode(gameID);
mess = mess + (("Gameidencoded: " + gameIDencoded) + " ");
trialURLdecoded = Grab_decode(grab_trialURL);
buyURLdecoded = Grab_decode(grab_buyURL);
if ((grab_ccode == undefined) || (grab_ccode.length == 0)) {
grab_ccode = "";
}
base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
stop();
barrel_orange.num = random(10) + 1;
barrel_red.num = random(10) + 1;
barrel_purple.num = random(10) + 1;
barrel_yellow.num = random(10) + 1;
barrel_green.num = random(10) + 1;
Instance of Symbol 14 MovieClip "fruitshootmaster" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function setup() {
var _local1 = _parent;
tarray = new Array();
str = _local1.motions.motionsteps(x1, y1, x2, y2, steps);
td = fruitdepth;
duplicateMovieClip (_local1["fruit" + wfruit], ["f" + td], td);
tarray = str.split("%");
steps = steps;
count = 0;
stepx = Number(tarray[0]);
stepy = Number(tarray[1]);
fx = x2;
fy = y2;
_local1["f" + td].wfruit = wfruit;
_local1["f" + td]._x = x1;
_local1["f" + td]._y = y1;
_local1["f" + td].fruit.gotoAndPlay(random(8) + 2);
active = 1;
}
function updateme() {
var _local1 = _parent;
count++;
if (count > steps) {
_local1["f" + td]._x = fx;
_local1["f" + td]._y = fy;
active = 0;
_local1.actions.setfruit(fruitspot, wfruit, td);
_local1["f" + td].fruit.stop();
removeMovieClip(this);
} else {
_local1["f" + td]._x = _local1["f" + td]._x + stepx;
_local1["f" + td]._y = _local1["f" + td]._y + stepy;
_local1["f" + td]._xscale = _local1["f" + td]._xscale + 1;
_local1["f" + td]._yscale = _local1["f" + td]._yscale + 1;
}
}
if (_name == "fruitshootmaster") {
active = 0;
} else {
setup();
}
}
onClipEvent (enterFrame) {
if (active == 1) {
updateme();
}
}
Instance of Symbol 14 MovieClip "barrelmovemaster" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function setup() {
var _local1 = _parent;
tarray = new Array();
str = _local1.motions.motionsteps(x1, y1, x2, y2, steps);
td = _local1.actions.getfxdepth();
duplicateMovieClip (_local1["master" + fruit], ["f" + td], td);
tarray = str.split("%");
steps = steps;
count = 0;
stepx = Number(tarray[0]);
stepy = Number(tarray[1]);
fx = x2;
fy = y2;
_local1["f" + td]._x = x1;
_local1["f" + td]._y = y1;
_local1["f" + td].fruit = fruit;
_local1["f" + td].depth = td;
_local1["f" + td].num = num;
_local1["f" + td].pos = 7;
_local1["f" + td].numberbox.numberbox.numbers.gotoAndStop(num);
active = 1;
}
function updateme() {
var _local1 = _parent;
count++;
if (count >= steps) {
_local1["f" + td]._x = fx;
_local1["f" + td]._y = fy;
active = 0;
if (pos >= 0) {
_local1.actions.updatebarrelsinfield(-1);
}
_local1.actions.setbarrel(80, num, fruit, 7, -1, fromstack);
removeMovieClip(_local1["f" + td]);
removeMovieClip(this);
} else {
_local1["f" + td]._x = _local1["f" + td]._x + stepx;
_local1["f" + td]._y = _local1["f" + td]._y + stepy;
}
}
if (_name == "barrelmovemaster") {
active = 0;
} else {
setup();
}
}
onClipEvent (enterFrame) {
if (active == 1) {
updateme();
}
}
Instance of Symbol 80 MovieClip "fruit0" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "fruit0") {
this.fruit.stop();
}
}
Instance of Symbol 120 MovieClip "fruit1" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "fruit1") {
this.fruit.stop();
}
}
Instance of Symbol 160 MovieClip "fruit2" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "fruit2") {
this.fruit.stop();
}
}
Instance of Symbol 200 MovieClip "fruit3" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "fruit3") {
this.fruit.stop();
}
}
Instance of Symbol 240 MovieClip "fruit4" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "fruit4") {
this.fruit.stop();
}
}
Instance of Symbol 242 MovieClip "spotg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 252 MovieClip "dustmaster" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "dustmaster") {
stop();
this.dustballs.dustball.main.stop();
}
}
Instance of Symbol 299 MovieClip "master2" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "master2") {
this.numberbox.stop();
this.barrel.stop();
}
}
Instance of Symbol 339 MovieClip "master3" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "master3") {
this.numberbox.stop();
this.barrel.stop();
}
}
Instance of Symbol 379 MovieClip "master4" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "master4") {
this.numberbox.stop();
this.barrel.stop();
}
}
Instance of Symbol 419 MovieClip "master1" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "master1") {
this.numberbox.stop();
this.barrel.stop();
}
}
Instance of Symbol 459 MovieClip "master0" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "master0") {
this.numberbox.stop();
this.barrel.stop();
}
}
Instance of Symbol 466 MovieClip "showlevelgraphic" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name eq "showlevelgraphic") {
this._visible = 0;
stop();
} else {
this._visible = 1;
play();
}
}
Instance of Symbol 472 MovieClip "clickong" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function setup(o, t, h) {
this._visible = 1;
match1.gotoAndStop(o);
match2.gotoAndStop(t);
match3.gotoAndStop(h);
}
function hideme() {
this._visible = 0;
}
this._visible = 0;
}
Instance of Symbol 514 MovieClip "actions" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function submitscore() {
_parent.endgame1(score);
}
function makesound(wsound) {
if (soundon == 1) {
_parent.soundfx[wsound].gotoAndPlay(2);
}
}
function doclick() {
makesound("sound_click");
}
function hideplaces() {
var _local1 = _parent;
x = 0;
while (x < totalbarrels) {
_local1["p" + x]._visible = 0;
x++;
}
}
function makecomma(num) {
var _local1 = num;
_local1 = _local1.toString();
commalen = _local1.length;
if (_local1 < 0) {
return(_local1);
}
clen = commalen;
setcomma = 0;
rnum = "";
while (clen > 3) {
clen = clen - 3;
}
setcomma = 3 - clen;
x = 0;
while (x < commalen) {
if (setcomma == 3) {
rnum = rnum + ",";
setcomma = 0;
}
char = _local1.substr(x, 1);
rnum = rnum + char;
rnum = rnum + "";
setcomma++;
x++;
}
return(rnum);
}
function showmenu() {
_parent["g" + menudepth].gotoAndPlay(2);
gameover = 1;
}
function showhelp() {
_parent["g" + helpdepth].gotoAndPlay(2);
}
function pausegame() {
_parent["g" + pausedepth].gotoAndPlay(2);
_parent.timeractions.pausetimer();
gameover = 2;
}
function resumegame() {
_parent.timeractions.pausetimer();
gameover = 0;
}
function shootfruit(wname, wfruit, wspot) {
var _local1 = _parent;
var _local2 = wname;
var _local3 = wspot;
makesound("sound_shootfruit");
makestars(_local1[_local2]._x, _local1[_local2]._y, _local1[_local2]._rotation);
td = getfxdepth();
duplicateMovieClip (_local1.fruitshootmaster, ["f" + td], td);
_local1["f" + td].x1 = _local1[_local2]._x;
_local1["f" + td].y1 = _local1[_local2]._y;
_local1["f" + td].x2 = _local1["fruit3" + _local3]._x;
_local1["f" + td].y2 = _local1["fruit3" + _local3]._y;
_local1["f" + td].steps = 12;
_local1["f" + td].wfruit = wfruit;
_local1["f" + td].fruitspot = _local3;
_local1["f" + td].fruitdepth = _local1[_local2].fruitdepth;
}
function makegraphics() {
barrelhilldepth = 599999 /* 0x0927BF */;
makegraphic("barrelhillsmaster", barrelhilldepth);
menudepth = 600000 /* 0x0927C0 */;
makegraphic("menug", menudepth);
levelupdepth = 600001 /* 0x0927C1 */;
makegraphic("levelupg", levelupdepth);
gameoverdepth = 600002 /* 0x0927C2 */;
makegraphic("gameoverg", gameoverdepth);
helpdepth = 600003 /* 0x0927C3 */;
makegraphic("helpg", helpdepth);
pausedepth = 600004 /* 0x0927C4 */;
makegraphic("pauseg", pausedepth);
}
function makegraphic(gname, gdep) {
duplicateMovieClip (_parent[gname], ["g" + gdep], gdep);
_parent[gname]._visible = 0;
}
function showgameover(reason) {
var _local1 = _parent;
gameover = 1.4;
_local1.clickong.hideme();
_local1.timeractions.pausetimer();
_local1["g" + gameoverdepth].gotoAndPlay(2);
_local1["g" + gameoverdepth].line1 = reason;
_local1["g" + gameoverdepth].line2 = makecomma(score);
_local1["g" + gameoverdepth].line3 = level;
clearscreen();
}
function showlevelup() {
var _local1 = _parent;
makesound("sound_levelup");
_local1.timeractions.timeroff();
_local1.clickong.hideme();
gameover = 2;
timebonus = remain * 100;
_local1["g" + levelupdepth].gotoAndPlay(2);
_local1["g" + levelupdepth].line1 = makecomma(timebonus);
_local1["g" + levelupdepth].startme();
updatescore(timebonus);
}
function startgame(glayout) {
if (glayout == "Normal") {
gamelayout = "Normal";
} else {
gamelayout = "Scatter";
}
trace("Game Layout: " + gamelayout);
_root.hsactions.highscoresetup("Name", "Score", "Level", gamelayout, "Jungle Fruit -" + gamelayout);
clearscreen();
gameover = 0;
score = 0;
updatescore(0);
level = 0;
startnextlevel();
}
function updatescore(num) {
score = score + num;
_parent.scoredisplay.num = makecomma(score);
_parent.scoredisplay.makenumber();
}
function processclicked(wname) {
var _local1 = _parent;
var _local2 = wname;
doclick();
if ((gameover != 0) || (inmotion == 1)) {
return(0);
}
numid = -1;
numid = _local1[_local2].num;
if ((numid >= 0) && (checkforgood(numid, current.num))) {
inarow++;
trackfspot++;
if (trackfspot > 2) {
trackfspot = 0;
}
fspot = trackfspot;
x2 = _local1["fruit3" + fspot]._x;
y2 = _local1["fruit3" + fspot]._y;
wangle = _local1.motions.getAngle(_local1[_local2]._x, _local1[_local2]._y, x2, y2);
_local1[_local2].fspot = fspot;
barrelswellandshoot(_local2, wangle);
amt = inarow * 25;
makescorefloat(_local1[_local2]._x, _local1[_local2]._y, "+" + amt);
updatescore(amt);
}
return(undefined);
}
function makescorefloat(sx, sy, mess) {
var _local1 = _parent;
fd = getfxdepth();
duplicateMovieClip (_local1.scorefloaterg, ["f" + fd], fd);
_local1["f" + fd]._x = sx;
_local1["f" + fd]._y = sy;
_local1["f" + fd].num = mess;
}
function setfruit(fspotin, ftype, fdepth) {
var _local1 = _parent;
if (fspotin == 2) {
tspot = fruit3array.length;
while ((tspot % 3) != 0) {
tspot--;
}
fruittypearray.splice(0);
back = 6;
while (back > 0) {
td = fruit3array[tspot - 1];
tspot--;
fruittypearray.push(_local1["f" + td].wfruit);
removeMovieClip(_local1["f" + td]);
back--;
if (tspot == 0) {
back = 0;
}
}
match = 0;
matchthis = fruittypearray[0];
if ((matchthis == fruittypearray[1]) && (matchthis == fruittypearray[2])) {
matchscore = 400;
} else if ((matchthis == fruittypearray[1]) || (matchthis == fruittypearray[2])) {
matchscore = 200;
} else if (fruittypearray[1] == fruittypearray[2]) {
matchscore = 200;
} else {
matchscore = 100;
}
updatescore(matchscore);
if (matchscore >= 400) {
_local1.backgroundg.gotoAndPlay(2);
makesound("sound_fruitremove3");
} else {
makesound("sound_fruitremove");
}
matchsteps = 35;
matchid = setInterval(removematchsign, 1000 / keepfps);
if (matchscore == 100) {
_local1.matchsigng.setup(2);
} else if (matchscore == 200) {
_local1.matchsigng.setup(3);
} else if (matchscore == 400) {
_local1.matchsigng.setup(4);
}
_local1.flashmaster.run();
}
}
function removematchsign() {
matchsteps--;
if (matchsteps == 0) {
_parent.matchsigng.gotoAndStop(1);
clearInterval(matchid);
}
}
function removebarrel(bname) {
removeMovieClip(_parent[bname]);
}
function movefromto(barrel1, barrel2, steps) {
var _local1 = _parent;
var _local2 = barrel1;
steps = 20;
makesound("sound_barrelmoving");
td = getfxdepth();
duplicateMovieClip (_local1.barrelmovemaster, ["f" + td], td);
_local1["f" + td].x1 = _local1[_local2]._x;
_local1["f" + td].y1 = _local1[_local2]._y;
_local1["f" + td].x2 = _local1[barrel2]._x;
_local1["f" + td].y2 = _local1[barrel2]._y;
_local1["f" + td].pos = _local1[_local2].pos;
current.num = _local1[_local2].num;
current.fruit = _local1[_local2].fruit;
_local1["f" + td].steps = 19;
_local1["f" + td].num = _local1[_local2].num;
_local1["f" + td].fruit = _local1[_local2].fruit;
_local1["f" + td].fruitspot = wspot;
barrelarray[_local1[_local2].pos] = -1;
freeupbarrels(_local1[_local2].row);
removeMovieClip(_local1[_local2]);
}
function clearoldbarrels() {
len = oldbarrelsarray.length;
x = 0;
while (x < len) {
removebarrel(["b" + oldbarrelsarray[x]]);
x++;
}
oldbarrelsarray.splice(0);
}
function setnewcurrent(wnum, wfruit) {
if (setdelay > 0) {
return(0);
}
if (gameover != 0) {
return(0);
}
_parent.clickong.hideme();
inarow = 0;
current.depth = 550000 /* 0x086470 */;
current.num = getnextbarrel();
if (current.num == -1) {
showgameover("Out of Barrels");
return(0);
}
current.fruit = getnextfruit();
orderoffset++;
setbarrel(-1, current.num, current.fruit, -1, current.depth);
updateremain(-1);
_parent["b" + current.depth]._visible = 0;
movefromto(["b" + current.depth], "spotg", 19);
setdelay = 12;
}
function soundcontrol() {
_parent.soundcontrolg._visible = 1;
}
function buildorder() {
remain = totalbarrels + 1;
remain = ((8 + level) * 3) + (23 - level);
if (remain < ((8 + level) * 3)) {
remain = ((8 + level) * 3) + 10;
}
orderoffset = 0;
barrelorderarray.splice(0);
fruitorderarray.splice(0);
fruitnum = 0;
barrelnum = 1;
x = 0;
while (x < remain) {
barrelorderarray.push(barrelnum);
fruitorderarray.push(fruitnum);
barrelnum++;
if (barrelnum > topnumber) {
barrelnum = 1;
}
fruitnum++;
if (fruitnum > 4) {
fruitnum = 0;
}
x++;
}
loop = 0;
while (loop < remain) {
f = getrandom(remain);
s = getrandom(remain);
save = barrelorderarray[f];
barrelorderarray[f] = barrelorderarray[s];
barrelorderarray[s] = save;
f = getrandom(remain);
s = getrandom(remain);
save = fruitorderarray[f];
fruitorderarray[f] = fruitorderarray[s];
fruitorderarray[s] = save;
loop++;
}
}
function startnextlevel() {
var _local1 = _parent;
if (level == totallayouts) {
showgameover("All Levels Completed");
_local1["g" + levelupdepth].gotoAndStop(1);
} else {
_local1.barrelsigng.gotoAndStop(1);
level++;
_local1.maskbackgroundg.gotoAndPlay(2);
td = getfxdepth();
duplicateMovieClip (_local1.showlevelgraphic, ["f" + td], td);
_local1["f" + td].num = level;
trackfspot = -1;
_local1.leveldisplay.num = level;
_local1.leveldisplay.makenumber();
gameover = 0;
fruit3array.splice(0);
buildorder();
buildlayout();
}
}
function buildarrays() {
barrelorderarray = new Array();
scatterarray = new Array();
fruitorderarray = new Array();
fruit3array = new Array();
fruittypearray = new Array();
current = new Object();
tempobject = new Object();
temparray = new Array();
motionarray = new Array();
xarray = new Array();
yarray = new Array();
oldbarrelsarray = new Array();
shootarray = new Array();
barrelarray = new Array();
fruitarray = new Array();
layoutarray = new Array();
freearray0 = new Array("7-8", "8-9", "9-10", "10-11", "11-12", "12-13", "13-14");
freearray1 = new Array("15-16", "16-17", "17-18", "18-19", "19-20", "20-21", "21-22", "22-23");
freearray2 = new Array("24-25", "25-26", "26-27", "27-28", "28-29", "29-30", "30-31", "31-32", "32-33");
freearray3 = new Array("34-35", "35-36", "36-37", "37-38", "38-39", "39-40", "40-41", "41-42", "42-43", "43-44");
freearray4 = new Array("45-46", "46-47", "47-48", "48-49", "49-50", "50-51", "51-52", "52-53", "53-54", "54-55", "55-56");
freearray5 = new Array("57-58", "58-59", "59-60", "60-61", "61-62", "62-63", "63-64", "64-65", "65-66", "66-67", "67-68", "68-69");
freeoffset = new Array(0, 7, 15, 24, 34, 45, 57);
}
function freeupbarrel(wpos) {
td = barrelarray[wpos];
_parent["b" + td].active.gotoAndStop(2);
}
function checkforgood(num1, num2) {
var _local1 = num2;
var _local2 = num1;
if (_local2 == _local1) {
return(1);
}
if ((_local1 - 1) == _local2) {
return(1);
}
if ((_local1 + 1) == _local2) {
return(1);
}
if ((_local1 == topnumber) && (_local2 == 1)) {
return(1);
}
if ((_local1 == 1) && (_local2 == topnumber)) {
return(1);
}
return(0);
}
function freeupbarrels(wrow) {
var _local1 = wrow;
var _local2 = this;
_local1--;
if (_local1 < 0) {
return(0);
}
offset = freeoffset[_local1];
len = _local2["freearray" + _local1].length;
x = 0;
while (x < len) {
temparray = _local2["freearray" + _local1][x].split("-");
fcheck = int(temparray[0]);
scheck = int(temparray[1]);
pos = x + offset;
if ((barrelarray[fcheck] == -1) && (barrelarray[scheck] == -1)) {
freeupbarrel(x + offset);
}
x++;
}
return(undefined);
}
function makelanding(sx, sy) {
var _local1 = _parent;
td = getfxdepth();
duplicateMovieClip (_local1.dustmaster, ["f" + td], td);
_local1["g" + barrelhilldepth].gotoAndPlay(2);
_local1.barrelshadowg.gotoAndStop(2);
_local1["f" + td]._x = sx;
_local1["f" + td]._y = sy;
}
function makestars(sx, sy, sr) {
var _local1 = _parent;
td = getfxdepth();
duplicateMovieClip (_local1.starmaster, ["f" + td], td);
_local1["f" + td]._x = sx;
_local1["f" + td]._y = sy;
_local1["f" + td]._rotation = sr;
}
function getlowdepth() {
lowdepth++;
if ((lowdepth < 0) || (lowdepth >= 500)) {
lowdepth = 0;
}
return(lowdepth);
}
function getfxdepth() {
fxdepth++;
if ((fxdepth < 1000) || (fxdepth >= 1200)) {
fxdepth = 1000;
}
return(fxdepth);
}
function getdepth() {
depth++;
if ((depth < 500) || (depth >= 999)) {
depth = 500;
}
return(depth);
}
function startspin(td) {
_parent[td].barrel.barrel.play();
_parent[td].numberbox.play();
}
function stopspin(td) {
_parent[td].barrel.freeze = 1;
}
function setangle(td, wangle) {
_parent[td]._rotation = wangle;
}
function barrelswellandshoot(td, wangle) {
var _local1 = _parent;
var _local2 = td;
_local1.clickong.hideme();
makesound("sound_swell");
_local1[_local2]._rotation = wangle;
_local1[_local2].play();
_local1[_local2].active.gotoAndStop(1);
nextfruitdepth = getfxdepth();
_local1[_local2].fruitdepth = nextfruitdepth;
fruit3array.push(nextfruitdepth);
temptd = getfxdepth();
_local1[_local2].swapDepths(temptd);
}
function loadlayout(wnum) {
layoutarray = this["layout" + wnum].split(",");
}
function levellayouts() {
layout1 = "0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,0,1,1,1,0,0,0,";
layout2 = "0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,";
layout3 = "0,0,1,1,1,0,0,0,0,0,1,1,0,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,";
layout4 = "1,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,";
layout5 = "1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,";
layout6 = "1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,";
layout7 = "0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,";
layout8 = "0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,";
layout9 = "1,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,1,1,1,1,1,0,1,0,0,1,1,0,1,1,1,1,1,0,1,1,0,";
layout10 = "0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,";
layout11 = "1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,1,0,";
layout12 = "1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,0,";
layout13 = "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,1,1,0,1,0,";
layout14 = "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,0,";
}
function clearscreen() {
var _local1 = _parent;
len = fruit3array.length;
while (len >= 0) {
len--;
td = fruit3array[len];
removeMovieClip(_local1["f" + td]);
}
fruit3array.splice(0);
while (depth >= 500) {
removeMovieClip(_local1["b" + depth]);
depth--;
}
while (lowdepth > 0) {
removeMovieClip(_local1["l" + depth]);
lowdepth--;
}
_local1.barrelshadowg.gotoAndStop(1);
_local1["g" + barrelhilldepth].gotoAndStop(1);
oldbarrelsarray.splice(0);
}
function getnextbarrel() {
if (orderoffset >= barrelorderarray.length) {
return(-1);
}
if (orderoffset == (barrelorderarray.length - 1)) {
_parent.barrelsigng.gotoAndStop(2);
}
return(barrelorderarray[orderoffset]);
}
function getnextfruit() {
return(fruitorderarray[orderoffset]);
}
function getrandom(num) {
return(random(num));
}
function updatebarrelsinfield(num) {
barrelsinfield = barrelsinfield + num;
if (barrelsinfield == 0) {
showlevelup();
}
}
function getrow(spotid) {
var _local1 = spotid;
if (_local1 >= 57) {
return(6);
}
if (_local1 >= 45) {
return(5);
}
if (_local1 >= 34) {
return(4);
}
if (_local1 >= 24) {
return(3);
}
if (_local1 >= 15) {
return(2);
}
if (_local1 >= 7) {
return(1);
}
return(0);
}
function updateremain(num) {
remain = remain + num;
_parent.leftdisplay.num = remain;
_parent.leftdisplay.makenumber();
}
function setbarrel(pos, num, fruit, wrow, td) {
var _local1 = _parent;
var _local2 = td;
var _local3 = num;
dontspin = 0;
if (_local2 == -1) {
dontspin = 1;
_local2 = getdepth();
}
duplicateMovieClip (_local1["master" + fruit], ["b" + _local2], _local2);
_local1["b" + _local2].num = _local3;
_local1["b" + _local2].numberbox.numberbox.numbers.gotoAndStop(_local3);
_local1["b" + _local2].row = wrow;
_local1["b" + _local2].fruit = fruit;
_local1["b" + _local2].depth = _local2;
_local1["b" + _local2].pos = pos;
stopspin(["b" + _local2]);
if (pos == 80) {
makesound("sound_barrelland");
if ((_local3 == 1) || (_local3 == topnumber)) {
if (_local1.wraparrowg._currentframe > 1) {
_local1.wraparrowg.gotoAndPlay(20);
} else {
_local1.wraparrowg.gotoAndPlay(2);
}
} else if (_local1.wraparrowg._currentframe > 1) {
_local1.wraparrowg.gotoAndPlay(7);
}
if ((tutoron == 1) && (level == 1)) {
_local1.tutorg.gotoAndStop(2);
inmotion = 1;
}
o = _local3 - 1;
if (o <= 0) {
o = topnumber;
}
t = _local3;
h = _local3 + 1;
if (h > topnumber) {
h = 1;
}
clearoldbarrels();
_local1["b" + _local2]._x = _local1.spotg._x;
_local1["b" + _local2]._y = _local1.spotg._y;
oldbarrelsarray.push(_local2);
makelanding(_local1.spotg._x, _local1.spotg._y);
_local1.clickong.setup(o, t, h);
} else if (pos >= 0) {
_local1["b" + _local2]._x = xarray[pos];
_local1["b" + _local2]._y = yarray[pos];
_local1["b" + _local2].row = getrow(pos);
} else {
_local1["b" + _local2]._x = 560;
_local1["b" + _local2]._y = 360;
}
}
function buildlayout() {
var _local1 = _parent;
clearscreen();
_local1.topbarrelg._visible = 1;
_local1.topbarrelg.gotoAndStop(topnumber);
barrelsinfield = 0;
if (toplevel > totallayouts) {
toplevel = totallayouts;
} else {
toplevel = level;
}
loadlayout(toplevel);
if (gamelayout != "Normal") {
needtofill = 0;
scatterarray.splice(0);
x = 0;
while (x < totalbarrels) {
if (int(layoutarray[x]) == 1) {
needtofill++;
}
x++;
}
trace("Need to fill: " + needtofill);
totalfilled = 0;
while (needtofill > 0) {
needtofill--;
totalfilled++;
scatterarray.push(1);
}
trace("Totalfilled: " + totalfilled);
while (totalfilled < totalbarrels) {
totalfilled++;
scatterarray.push(0);
}
trace("Total barrels: " + totalbarrels);
trace("scatterarray.length: " + scatterarray.length);
loop = 0;
while (loop < 3) {
x = 0;
while (x < totalbarrels) {
spot = getrandom(totalbarrels);
hold = scatterarray[x];
scatterarray[x] = scatterarray[spot];
scatterarray[spot] = hold;
x++;
}
loop++;
}
}
x = 0;
while (x < totalbarrels) {
xarray[x] = _local1["p" + x]._x;
yarray[x] = _local1["p" + x]._y;
_local1["p" + x]._visible = 0;
if (gamelayout == "Normal") {
filled = int(layoutarray[x]);
} else {
filled = int(scatterarray[x]);
}
if (filled == 1) {
num = getnextbarrel();
numberarray[x] = num;
fruit = getnextfruit();
fruitarray[x] = fruit;
orderoffset++;
td = getdepth();
barrelarray[x] = td;
wrow = getrow(x);
updatebarrelsinfield(1);
setbarrel(x, num, fruit, wrow, td);
updateremain(-1);
if (wrow >= 6) {
freeupbarrel(x);
}
} else {
numberarray[x] = (fruitarray[x] = (barrelarray[x] = -1));
}
x++;
}
f = 1;
while (f <= 6) {
freeupbarrels(f);
f++;
}
}
setdelay = 0;
soundon = 1;
totallayouts = 14;
gametime = 150;
inmotion = 0;
levelup = 0;
totalbarrels = 70;
totalfruit = 5;
topnumber = 9;
fxdepth = 1000;
depth = 500;
lowdepth = 0;
buildarrays();
makegraphics();
levellayouts();
showmenu();
hideplaces();
keepfps = 25;
tutoron = 1;
_parent.topbarrelg._visible = 0;
demo = 0;
}
onClipEvent (enterFrame) {
if ((gameover == 0) && (_parent.timeractions.timesup == 1)) {
showgameover("Out of Time");
}
if (setdelay > 0) {
setdelay--;
}
}
Instance of Symbol 518 MovieClip "motions" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function initMath() {
Deg2Rad = (Math.PI/180);
Rad2Deg = 1 / Deg2Rad;
TABLE_SIZE = 720;
initTables();
}
function moveObj(x, y, angle, step) {
var _local1 = angle;
_local1 = int(_local1);
if (temppoint != 1) {
temp = new Object();
temppoint = 1;
}
if ((_local1 - 90) > 0) {
ang_adj = _local1 - 90;
} else {
ang_adj = _local1 + 270;
}
temp.x = x + (step * myCos[ang_adj]);
temp.y = y + (step * mySin[ang_adj]);
return(temp);
}
function motionsteps(x1, y1, x2, y2, steps) {
dx = Math.abs(x1 - x2);
dy = Math.abs(y1 - y2);
stepx = dx / steps;
stepy = dy / steps;
if (x1 > x2) {
stepx = stepx * -1;
}
if (y1 > y2) {
stepy = stepy * -1;
}
str = (stepx + "%") + stepy;
return(str);
}
function reflectAngle(objAng, hitAng) {
var _local1 = objAng;
_local1 = _local1 - hitAng;
_local1 = (360 - _local1) + hitAng;
if (_local1 >= 360) {
_local1 = _local1 % 360;
}
return(_local1);
}
function getAngle(x, y, x1, y1) {
distX = x - x1;
distY = y - y1;
t = Math.atan2(distY, distX) * Rad2Deg;
if (t < 0) {
t = t + 360;
}
remain = t - Math.floor(t);
if (remain <= 0.25) {
t = Math.floor(t);
} else if ((remain > 0.25) && (remain <= 0.75)) {
t = Math.floor(t) + 0.5;
} else {
t = Math.ceil(t);
}
t = t - 90;
if (t < 0) {
t = t + 360;
}
return(t);
}
function Rand(min, max) {
return(Math.floor(Math.random() * ((max + 1) - min)) + min);
}
function getVector(x, y, x1, y1) {
return(Math.sqrt(((x - x1) * (x - x1)) + ((y - y1) * (y - y1))));
}
function initTables() {
mySin = new Array(TABLE_SIZE);
myCos = new Array(TABLE_SIZE);
i = 0;
while (i < TABLE_SIZE) {
temp = Deg2Rad * i;
mySin[i] = Math.sin(temp);
myCos[i] = Math.cos(temp);
i = i + 0.5;
}
}
function moveObj2(object, angle, step) {
var _local1 = angle;
var _local2 = object;
_local1 = int(_local1);
if ((_local1 - 90) > 0) {
ang_adj = _local1 - 90;
} else {
ang_adj = _local1 + 270;
}
_local2._x = _local2._x + (step * myCos[ang_adj]);
_local2._y = _local2._y + (step * mySin[ang_adj]);
}
initMath();
}
Instance of Symbol 525 MovieClip "timeractions" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function gettimeremaining() {
return(tr);
}
function starttimer(secondsin) {
seconds = secondsin;
starttimers = 1;
ptimer = 0;
}
function timeroff() {
timeron = 0;
showmin = "";
showsec = "";
}
function pausetimer(window) {
if (ptimer == 0) {
ptimer = 1;
poffset = getTimer();
} else if (ptimer == 1) {
time = getTimer();
psecs = psecs + int((time - poffset) / 1000);
ptimer = 0;
}
}
tr = 0;
showmin = "";
showsec = "";
_parent.showtimer = "";
}
onClipEvent (enterFrame) {
if (starttimers == 1) {
starttimers = 0;
timesup = 0;
ptimer = 0;
psecs = 0;
offsettimer = getTimer();
timeron = 1;
}
if (timeron && (ptimer == 0)) {
time = getTimer();
temptime = int((time - offsettimer) / 1000);
htime = temptime - psecs;
if (htime >= seconds) {
if ((_parent.actions.soundon == 1) && (timeron == 1)) {
this.soundtimesup.gotoAndPlay(2);
}
timeron = 0;
showmin = "";
showsec = "00";
timesup = 1;
}
if (timeron) {
tr = seconds - htime;
if (((_parent.actions.soundon == 1) && (tr <= 6)) && (trhold != tr)) {
this.soundclocktick.gotoAndPlay(2);
trhold = tr;
}
if (tr > 59) {
showmin = int(tr / 60);
showsec = tr % 60;
} else {
showmin = "";
showsec = tr;
}
if ((showmin > 0) && (showsec == 0)) {
showsec = "00";
}
if ((showsec > 0) && (showsec < 10)) {
showsec = "0" + showsec;
}
}
}
showtimer = (showmin + ":") + showsec;
_parent.timerdisplay.num = showtimer;
_parent.timerdisplay.makenumber();
}
Instance of Symbol 537 MovieClip "levelupg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function startme() {
this._y = starty;
active = 1;
}
function stopme() {
this._y = starty;
active = 0;
}
function updateme() {
trace("Moving Levelup");
this._y = this._y + step;
}
spacing = 3;
starty = this._y;
step = -0.5;
}
onClipEvent (enterFrame) {
if (active == 1) {
updateme();
}
}
Instance of Symbol 539 MovieClip "fruitscoreg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 542 MovieClip "flashmaster" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function run() {
this.flash1.gotoAndPlay(2);
flash = 1;
}
function nextone() {
flash++;
if (flash <= 3) {
this["flash" + flash].gotoAndPlay(2);
}
}
}
Instance of Symbol 554 MovieClip "starmaster" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
if (_name != "starmaster") {
active = 1;
this.gotoAndPlay(2);
x = 1;
while (x <= 3) {
this["star" + x]._rotation = this["star" + x]._rotation + (random(50) - 25);
x++;
}
} else {
active = 0;
this.gotoAndStop(1);
}
}
Instance of Symbol 590 MovieClip "matchsigng" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function setup(wsign) {
this.gotoAndPlay(2);
this.main.gotoAndStop(wsign);
}
this.swapDepths(800765);
}
Instance of Symbol 598 MovieClip "leftdisplay" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function makenumber() {
var _local1 = this;
_local1._visible = 1;
if (td > 0) {
while (td > 0) {
removeMovieClip(_local1["f" + td]);
td--;
}
}
var letters = new Array();
td = 0;
_local1._x = holdx;
tw = 0;
lastwid = 0;
num = num.toString();
len = num.length;
x = 0;
while (x < len) {
td++;
wnum = num.substr(x, 1);
duplicateMovieClip (_local1.numbermaster, ["f" + td], td);
_local1["f" + td]._x = _local1["f" + td]._x + lastwid;
if (wnum == "+") {
_local1["f" + td].gotoAndStop(14);
} else if (wnum == "0") {
_local1["f" + td].gotoAndStop(10);
} else if (wnum == ",") {
_local1["f" + td].gotoAndStop(11);
} else if (wnum == ":") {
_local1["f" + td].gotoAndStop(12);
} else if (wnum == "-") {
_local1.numbermaster._x = _local1.textmaster._x + (xoff / 2);
_local1.numbermaster._y = _local1.numbermaster._y + 13;
} else {
_local1["f" + td].gotoAndStop(int(wnum));
}
w1 = _local1["f" + td].mask._width;
lastwid = lastwid + w1;
tw = tw + w1;
x++;
}
_local1._x = _local1._x - (tw / 2);
_local1.numbermaster._visible = 0;
}
function update() {
}
active = 0;
td = 0;
holdx = this._x;
holdxnumber = this.numbermaster._x;
if (active == 1) {
makenumber();
} else {
this._visible = 0;
}
}
onClipEvent (enterFrame) {
}
Instance of Symbol 598 MovieClip "scorefloaterg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function makenumber() {
var _local1 = this;
_local1._visible = 1;
if (td > 0) {
while (td > 0) {
removeMovieClip(_local1["f" + td]);
td--;
}
}
var letters = new Array();
td = 0;
_local1._x = holdx;
tw = 0;
lastwid = 0;
num = num.toString();
len = num.length;
x = 0;
while (x < len) {
td++;
wnum = num.substr(x, 1);
duplicateMovieClip (_local1.numbermaster, ["f" + td], td);
_local1["f" + td]._x = _local1["f" + td]._x + lastwid;
if (wnum == "+") {
_local1["f" + td].gotoAndStop(14);
} else if (wnum == "0") {
_local1["f" + td].gotoAndStop(10);
} else if (wnum == ",") {
_local1["f" + td].gotoAndStop(11);
} else if (wnum == ":") {
_local1["f" + td].gotoAndStop(12);
} else if (wnum == "-") {
_local1.numbermaster._x = _local1.textmaster._x + (xoff / 2);
_local1.numbermaster._y = _local1.numbermaster._y + 13;
} else {
_local1["f" + td].gotoAndStop(int(wnum));
}
w1 = _local1["f" + td].mask._width;
lastwid = lastwid + w1;
tw = tw + w1;
x++;
}
_local1._x = _local1._x - (tw / 2);
_local1.numbermaster._visible = 0;
}
function update() {
if (steps <= 0) {
removeMovieClip(this);
} else {
this._y = this._y + stepsize;
steps--;
}
}
active = 0;
if (_name != "scorefloaterg") {
active = 1;
}
td = 0;
holdx = this._x;
holdxnumber = this.numbermaster._x;
steps = 45;
stepsize = 0.7;
if (active == 1) {
makenumber();
} else {
this._visible = 0;
}
}
onClipEvent (enterFrame) {
if (active == 1) {
update();
}
}
Instance of Symbol 648 MovieClip "menug" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(2);
}
Instance of Symbol 655 MovieClip "fruit30" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 655 MovieClip "fruit31" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 655 MovieClip "fruit32" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 663 MovieClip "maskbackgroundg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(900000);
}
Instance of Symbol 598 MovieClip "scoredisplay" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function makenumber() {
var _local1 = this;
_local1._visible = 1;
if (td > 0) {
while (td > 0) {
removeMovieClip(_local1["f" + td]);
td--;
}
}
var letters = new Array();
td = 0;
_local1._x = holdx;
tw = 0;
lastwid = 0;
num = num.toString();
len = num.length;
x = 0;
while (x < len) {
td++;
wnum = num.substr(x, 1);
duplicateMovieClip (_local1.numbermaster, ["f" + td], td);
_local1["f" + td]._x = _local1["f" + td]._x + lastwid;
if (wnum == "+") {
_local1["f" + td].gotoAndStop(14);
} else if (wnum == "0") {
_local1["f" + td].gotoAndStop(10);
} else if (wnum == ",") {
_local1["f" + td].gotoAndStop(11);
} else if (wnum == ":") {
_local1["f" + td].gotoAndStop(12);
} else if (wnum == "-") {
_local1.numbermaster._x = _local1.textmaster._x + (xoff / 2);
_local1.numbermaster._y = _local1.numbermaster._y + 13;
} else {
_local1["f" + td].gotoAndStop(int(wnum));
}
w1 = _local1["f" + td].mask._width;
lastwid = lastwid + w1;
tw = tw + w1;
x++;
}
_local1._x = _local1._x - (tw / 2);
_local1.numbermaster._visible = 0;
}
function update() {
}
active = 0;
td = 0;
holdx = this._x;
holdxnumber = this.numbermaster._x;
if (active == 1) {
makenumber();
} else {
this._visible = 0;
}
}
onClipEvent (enterFrame) {
}
Instance of Symbol 598 MovieClip "leveldisplay" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
function makenumber() {
var _local1 = this;
_local1._visible = 1;
if (td > 0) {
while (td > 0) {
removeMovieClip(_local1["f" + td]);
td--;
}
}
var letters = new Array();
td = 0;
_local1._x = holdx;
tw = 0;
lastwid = 0;
num = num.toString();
len = num.length;
x = 0;
while (x < len) {
td++;
wnum = num.substr(x, 1);
duplicateMovieClip (_local1.numbermaster, ["f" + td], td);
_local1["f" + td]._x = _local1["f" + td]._x + lastwid;
if (wnum == "+") {
_local1["f" + td].gotoAndStop(14);
} else if (wnum == "0") {
_local1["f" + td].gotoAndStop(10);
} else if (wnum == ",") {
_local1["f" + td].gotoAndStop(11);
} else if (wnum == ":") {
_local1["f" + td].gotoAndStop(12);
} else if (wnum == "-") {
_local1.numbermaster._x = _local1.textmaster._x + (xoff / 2);
_local1.numbermaster._y = _local1.numbermaster._y + 13;
} else {
_local1["f" + td].gotoAndStop(int(wnum));
}
w1 = _local1["f" + td].mask._width;
lastwid = lastwid + w1;
tw = tw + w1;
x++;
}
_local1._x = _local1._x - (tw / 2);
_local1.numbermaster._visible = 0;
}
function update() {
}
active = 0;
td = 0;
holdx = this._x;
holdxnumber = this.numbermaster._x;
if (active == 1) {
makenumber();
} else {
this._visible = 0;
}
}
onClipEvent (enterFrame) {
}
Instance of Symbol 691 MovieClip "tutorg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(900999);
}
Instance of Symbol 705 MovieClip "soundcontrolg" in Symbol 706 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(998775);
this._visible = 0;
}