Frame 1
stop();
Stage.showMenu = false;
Instance of Symbol 23 MovieClip in Frame 1
onClipEvent (load) {
now = new Date();
rightnow = now.getTime();
"gamelogin.php?rightnow=" + rightnow;
}
onClipEvent (enterFrame) {
if (0 < _root.login) {
_root.playgameclip._visible = true;
if (_root.login == 2) {
_root.welcome = ((("<b>Welcome " + _root.myname) + " </b>!<br><br>If you are not ") + _root.myname) + ", please logout at the top of the page.";
}
}
}
Instance of Symbol 27 MovieClip "helpwindow" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Frame 2
function makeApples() {
_root.applenum = Math.floor(_root.level / 5) + 6;
_root.gotapples = 0;
aa = 1;
while (aa < (_root.applenum + 1)) {
_root.apple0.duplicateMovieClip("apple" + aa, aa);
_root["apple" + aa]._x = (random(8) * 50) + 30;
_root["apple" + aa]._y = (random(7) * 30) + 20;
aa++;
}
}
function makeEvils() {
_root.evilnum = Math.floor(_root.level / 5);
if (0 < _root.evilnum) {
cc = 1;
while (cc < (_root.evilnum + 1)) {
_root.evil0.duplicateMovieClip("evil" + cc, cc + 200);
_root["evil" + cc]._x = (random(40) * 6) + 100;
_root["evil" + cc]._y = (random(20) * 10) + 20;
ac = 1;
while (ac < (_root.applenum + 1)) {
if (_root["evil" + cc].hitTest(_root["apple" + ac])) {
_root["apple" + ac].removeMovieClip();
_root.gotapples++;
}
ac++;
}
cc++;
}
}
}
function makeBricks() {
bricklinecount = 3;
_root.bricknum = _root.level + 6;
brickform = random(3) + 1;
bb = 1;
while (bb < _root.bricknum) {
_root.brick0.duplicateMovieClip("brick" + bb, bb + 100);
if (brickform == 1) {
_root["brick" + bb]._x = (random(8) * 50) + 30;
_root["brick" + bb]._y = (random(7) * 30) + 20;
} else if (brickform == 2) {
if (_root["apple" + bb]._x) {
_root["brick" + bb]._x = _root["apple" + bb]._x;
_root["brick" + bb]._y = _root["apple" + bb]._y + 20;
} else {
_root["brick" + bb]._x = (random(8) * 50) + 30;
_root["brick" + bb]._y = (random(7) * 30) + 20;
}
} else if (brickform == 3) {
if (bricklinecount == 3) {
linebrickx = (random(6) * 50) + 40;
linebricky = (random(4) * 30) + 160;
bricklinecount = 0;
}
_root["brick" + bb]._x = linebrickx;
_root["brick" + bb]._y = linebricky;
linebrickx = linebrickx + 50;
bricklinecount++;
}
bb++;
}
}
function makeSpecials() {
specialnum = Math.floor(_root.level / 10) + 1;
dd = 1;
while (dd < (_root.specialnum + 1)) {
if ((random(2) + 1) < 2) {
_root.fireapple.duplicateMovieClip("fireapple" + dd, dd + 300);
_root["fireapple" + dd]._x = (random(8) * 50) + 30;
_root["fireapple" + dd]._y = (random(7) * 30) + 20;
} else {
_root.lifeapple.duplicateMovieClip("lifeapple" + dd, dd + 300);
_root["lifeapple" + dd]._x = (random(8) * 50) + 30;
_root["lifeapple" + dd]._y = (random(7) * 30) + 20;
}
dd++;
}
}
function makeLevel() {
makeApples();
makeBricks();
makeEvils();
makeSpecials();
_root.slidebar._x = 224;
_root.bouncedibble.status = "normal";
_root.firebit1._x = -300;
_root.firebit2._x = -300;
_root.firebit3._x = -300;
_root.firebit4._x = -300;
_root.firebit1.oldx = -300;
_root.firebit2.oldx = -300;
_root.firebit3.oldx = -300;
_root.firebit4.oldx = -300;
_root.bouncedibble.upspeed = 0;
_root.bouncedibble.downspeed = 1;
_root.bouncedibble.sidespeed = 0;
}
function dibbleRebirth() {
_root.lives--;
if (_root.lives < 1) {
_root.gotoAndStop("gameoverspot");
}
_root.bouncedibble.status = "normal";
_root.firebit1._x = -300;
_root.firebit2._x = -300;
_root.firebit3._x = -300;
_root.firebit4._x = -300;
_root.firebit1.oldx = -300;
_root.firebit2.oldx = -300;
_root.firebit3.oldx = -300;
_root.firebit4.oldx = -300;
_root.bouncedibble.upspeed = 0;
_root.bouncedibble.downspeed = 1;
_root.bouncedibble.sidespeed = 0;
_root.bouncedibble._y = 300;
_root.bouncedibble._x = 224;
_root.slidebar._x = 224;
}
soundon = "yes";
level = 1;
lives = 5;
score = 0;
_root.lvlup0.duplicateMovieClip("lvlup", 1000);
makeLevel();
stop();
Instance of Symbol 77 MovieClip "firebit1" in Frame 2
onClipEvent (enterFrame) {
if (_root.bouncedibble.status == "onfire") {
oldx = this._x;
oldy = this._y;
this._x = _root.bouncedibble._x;
this._y = _root.bouncedibble._y;
}
}
Instance of Symbol 79 MovieClip "firebit2" in Frame 2
onClipEvent (enterFrame) {
if (_root.bouncedibble.status == "onfire") {
oldx = this._x;
oldy = this._y;
this._x = _root.firebit1.oldx;
this._y = _root.firebit1.oldy;
}
}
Instance of Symbol 81 MovieClip "firebit3" in Frame 2
onClipEvent (enterFrame) {
if (_root.bouncedibble.status == "onfire") {
oldx = this._x;
oldy = this._y;
this._x = _root.firebit2.oldx;
this._y = _root.firebit2.oldy;
}
}
Instance of Symbol 83 MovieClip "firebit4" in Frame 2
onClipEvent (enterFrame) {
if (_root.bouncedibble.status == "onfire") {
this._x = _root.firebit3.oldx;
this._y = _root.firebit3.oldy;
}
}
Instance of Symbol 85 MovieClip "bouncedibble" in Frame 2
onClipEvent (enterFrame) {
if (0 < _root.timer) {
_root.timer--;
}
this._x = this._x + sidespeed;
this._y = this._y + downspeed;
this._y = this._y - upspeed;
downspeed = downspeed * grav;
if ((upspeed < downspeed) && (0 < upspeed)) {
downspeed = downspeed - upspeed;
downspeed = downspeed + 1;
upspeed = 0;
this.gotoAndStop(3);
}
if (this.hitTest(_root.slidebar.hitbit)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("bouncesound");
s.setVolume(100);
s.start();
}
if (Key.isDown(Key.SPACE)) {
upspeed = (downspeed * 0.4) + 5;
} else {
upspeed = downspeed * 0.3;
}
_root.slidebar.trampoline.play();
if (4 < upspeed) {
this.gotoAndStop(2);
sidespeed = sidespeed + ((_root.bouncedibble._x - _root.slidebar._x) / 10);
} else {
this.gotoAndStop(1);
sidespeed = sidespeed + ((_root.bouncedibble._x - _root.slidebar._x) / 20);
}
this._y = _root.slidebar._y - 12;
if (1 >= upspeed) {
upspeed = 1.5;
}
downspeed = 1;
}
if (this.hitTest(_root.leftside)) {
sidespeed = -sidespeed;
this._x = this._x + sidespeed;
this._x = this._x + 2;
} else if (this.hitTest(_root.rightside)) {
sidespeed = -sidespeed;
this._x = this._x + sidespeed;
this._x = this._x - 2;
}
if (this.hitTest(_root.top)) {
this.gotoAndStop(3);
this._y = _root.top._y;
upspeed = 0;
}
if (this.hitTest(_root.bottom)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("diesound");
s.setVolume(100);
s.start();
}
_root.dibbleRebirth();
}
}
onClipEvent (load) {
downspeed = 1;
sidespeed = 0;
upspeed = 0;
grav = 1.1;
status = "normal";
}
Instance of Symbol 90 MovieClip "slidebar" in Frame 2
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
this._x = this._x - 5;
_root.slidebar.sidedib1.play();
_root.slidebar.sidedib2.play();
}
if (Key.isDown(Key.RIGHT)) {
this._x = this._x + 5;
_root.slidebar.sidedib1.play();
_root.slidebar.sidedib2.play();
}
}
Instance of Symbol 100 MovieClip "apple0" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.bouncedibble)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("pickupsound");
s.setVolume(100);
s.start();
}
_root.gotapples++;
_root.score = _root.score + 100;
if (_root.gotapples == _root.applenum) {
_root.level++;
_root.score = _root.score + ((100 * _root.level) + _root.timer);
_root.bouncedibble._x = -600;
_root.lvlup.play();
_root.makeLevel();
}
this.removeMovieClip();
}
}
Instance of Symbol 101 MovieClip "fireapple" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.bouncedibble)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("firesound");
s.setVolume(100);
s.start();
}
_root.bouncedibble.status = "onfire";
_root.firebit1._x = _root.bouncedibble._x;
_root.firebit1._y = _root.bouncedibble._y;
_root.firebit2._x = _root.bouncedibble._x;
_root.firebit2._y = _root.bouncedibble._y;
_root.firebit3._x = _root.bouncedibble._x;
_root.firebit3._y = _root.bouncedibble._y;
_root.firebit4._x = _root.bouncedibble._x;
_root.firebit4._y = _root.bouncedibble._y;
this.removeMovieClip();
}
}
Instance of Symbol 102 MovieClip "lifeapple" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.bouncedibble)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("lifesound");
s.setVolume(100);
s.start();
}
_root.lives++;
this.removeMovieClip();
}
}
Instance of Symbol 103 MovieClip "evil0" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.bouncedibble)) {
if (_root.bouncedibble.status == "onfire") {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("firesound");
s.setVolume(100);
s.start();
}
_root.bouncedibble.status = "normal";
_root.score = _root.score + 100;
_root.firebit1._x = -300;
_root.firebit2._x = -300;
_root.firebit3._x = -300;
_root.firebit4._x = -300;
this.removeMovieClip();
} else {
this.play();
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("diesound");
s.setVolume(100);
s.start();
}
_root.bouncedibble._x = -600;
dibbleeatingtime = 12;
}
}
if (0 < dibbleeatingtime) {
dibbleeatingtime--;
}
if (dibbleeatingtime == 0) {
dibbleeatingtime = -1;
_root.dibbleRebirth();
}
}
onClipEvent (load) {
dibbleeatingtime = -1;
}
Instance of Symbol 104 MovieClip "brick0" in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.bouncedibble)) {
if (_root.soundon == "yes") {
s = new Sound();
s.attachSound("poofsound");
s.setVolume(100);
s.start();
}
if (_root.bouncedibble.status != "onfire") {
if ((((12 < (_root.bouncedibble._x - this._x)) || ((_root.bouncedibble._x - this._x) < -12)) && ((_root.bouncedibble._y - this._y) < 9)) && (-9 < (_root.bouncedibble._y - this._y))) {
_root.bouncedibble.sidespeed = -_root.bouncedibble.sidespeed;
_root.bouncedibble._x = _root.bouncedibble._x + _root.bouncedibble.sidespeed;
}
if (_root.bouncedibble.upspeed >= _root.bouncedibble.downspeed) {
_root.bouncedibble.gotoAndStop(3);
_root.bouncedibble.upspeed = 0;
_root.bouncedibble._y = this._y + 25;
} else {
_root.bouncedibble.upspeed = _root.bouncedibble.downspeed * 0.5;
_root.bouncedibble.downspeed = 1;
_root.bouncedibble._y = this._y - 25;
}
}
_root.score = _root.score + 10;
this.removeMovieClip();
}
}
Frame 5
aa = 1;
while (aa < (_root.applenum + 1)) {
_root["apple" + aa].removemovieclip();
aa++;
}
cc = 1;
while (cc < (_root.evilnum + 1)) {
_root["evil" + cc].removemovieclip();
cc++;
}
bb = 1;
while (bb < _root.bricknum) {
_root["brick" + bb].removemovieclip();
bb++;
}
dd = 1;
while (dd < (_root.specialnum + 1)) {
_root["fireapple" + dd].removemovieclip();
_root["lifeapple" + dd].removemovieclip();
dd++;
}
_root.scorea = _root.score + "a";
scorelength = _root.scorea.length;
scorelength--;
a = 0;
while (a < scorelength) {
_root["scorenum" + a] = _root.scorea.substr(a, 1);
if (_root["scorenum" + a] == 0) {
_root["scorenum" + a] = "z";
} else if (_root["scorenum" + a] == 1) {
_root["scorenum" + a] = 7;
} else if (_root["scorenum" + a] == 2) {
_root["scorenum" + a] = 3;
} else if (_root["scorenum" + a] == 3) {
_root["scorenum" + a] = "p";
} else if (_root["scorenum" + a] == 4) {
_root["scorenum" + a] = "j";
} else if (_root["scorenum" + a] == 5) {
_root["scorenum" + a] = 5;
} else if (_root["scorenum" + a] == 6) {
_root["scorenum" + a] = 1;
} else if (_root["scorenum" + a] == 7) {
_root["scorenum" + a] = "t";
} else if (_root["scorenum" + a] == 8) {
_root["scorenum" + a] = "k";
} else if (_root["scorenum" + a] == 9) {
_root["scorenum" + a] = 6;
}
a++;
}
_root.scorecode = ("x" + random(9)) + random(9);
b = scorelength - 1;
while (b >= 0) {
_root.scorecode = _root.scorecode + _root["scorenum" + b];
b--;
}
now = new Date();
rightnow = now.getTime();
if ((_root.myname != "") && (_root.myname != undefined)) {
(((("applescore.php?mynewscore=" + _root.score) + "&scorecode=") + _root.scorecode) + "&rightnow=") + rightnow;
}
stop();
gname = "applehunt";
gscore = score;
_root.score = gscore;
_root.gameover = 1;
stop();
Symbol 14 Button
on (release) {
gotoAndStop (2);
}
Symbol 20 Button
on (release) {
_root.helpwindow._visible = true;
}
Symbol 32 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 47 Button
on (release) {
nextFrame();
}
Symbol 50 Button
on (release) {
_root.helpwindow._visible = false;
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 75 Button
on (release) {
_root.helpwindow._visible = false;
}
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 3
gotoAndStop (1);
Symbol 76 MovieClip Frame 1
if (this.sessionstarted != 1) {
this.arcade = new LoadVars();
this.sessionvars = new LoadVars();
this.arcade.gamename = "applehunt";
this.arcade.sessdo = "sessionstart";
this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
if (this.sessionvars.sessiontype != 2) {
_root.is_a_challenge = 0;
} else {
_root.is_a_challenge = 1;
}
this.sessionstarted = 1;
}
if (_root.gameover == 1) {
if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
this.prequestvars = new LoadVars();
this.pranswer = new LoadVars();
this.prequestvars.gametime = this.sessionvars.gametime;
this.prequestvars.fakekey = this.sessionvars.initbar;
_root.score = int(Number(_root.score));
if (_root.score != 0) {
this.prequestvars.score = _root.score;
} else {
this.prequestvars.score = -1;
}
this.prequestvars.id = this.sessionvars.lastid;
this.prequestvars.sessdo = "permrequest";
this.prequestvars.note = (this.prequestvars.id * this.prequestvars.score) * this.prequestvars.fakekey;
this.prequestvars.sendAndLoad("./arcade.php", this.pranswer, "POST");
this.askpermission = 1;
}
if ((this.pranswer.validate == 1) && (this.finalsent != 1)) {
this.burnscore = new LoadVars();
this.burnscore.microone = this.pranswer.microone;
this.burnscore.gametime = this.prequestvars.gametime;
this.burnscore.id = this.prequestvars.id;
if (_root.score == 0) {
this.burnscore.noscore = 1;
}
this.burnscore.sessdo = "burn";
this.burnscore.send("./arcade.php", "_self", "POST");
this.finalsent = 1;
}
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 89 Button
on (release) {
gotoAndStop (2);
}
Symbol 91 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 95 Button
on (release) {
_root.helpwindow._visible = true;
}
Symbol 103 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 45
_root.bouncedibble._x = 224;
_root.bouncedibble._y = 300;
_root.bouncedibble.upspeed = 0;
_root.bouncedibble.downspeed = 1;
_root.bouncedibble.sidespeed = 0;
_root.timer = 1500 + (_root.level * 250);
Symbol 124 Button
on (release) {
if (_root.soundon == "yes") {
_root.soundon = "no";
_root.onoffclip.gotoAndStop(2);
} else {
_root.soundon = "yes";
_root.onoffclip.gotoAndStop(1);
}
}
Symbol 123 MovieClip Frame 1
stop();
Symbol 133 Button
on (release) {
gotoAndStop (1);
}
Symbol 136 Button
on (release) {
gotoAndStop (1);
}