Frame 1
OnePercent = this.getBytesTotal() / 100;
begTime = getTimer() / 1000;
asize = getBytesTotal();
Frame 2
tellTarget ("Progress Bar") {
with ("Progress Bar") {
n = (getTimer() / 1000) - this.begTime;
bps = Math.round(this.getBytesLoaded() / n);
tr = (this.asize - this.getBytesLoaded()) / bps;
trround = Math.floor(tr);
trf = Math.round((tr - trround) * 100);
trem = Math.floor(tr) + (trf / 100);
}
gotoAndStop(Math.round(this.getBytesLoaded() / _parent.OnePercent));
};
if (this.getBytesLoaded() >= this.getBytesTotal()) {
gotoAndStop (5);
}
Frame 3
gotoAndPlay ("CheckLoaded");
Frame 5
stop();
Frame 6
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
mySound = new Sound(_root.gameSound);
resetGame = function () {
i = 1;
lives = 3;
level = 1;
score = 0;
timer = true;
lane1Speed = 1.5;
lane2Speed = 1.5;
lane3Speed = 2;
lane4Speed = 2.5;
log1Speed = 1;
log2Speed = 1.5;
log3Speed = 1;
log4Speed = 1.5;
checkPoints = 0;
};
startGame = function () {
var _local1 = _root;
x = 0;
while (x < 3) {
duplicateMovieClip (firstLane, "firstLane" + i, i);
_local1["firstLane" + i]._x = x * 150;
_local1["firstLane" + i]._y = 350;
i++;
duplicateMovieClip (secondLane, "secondLane" + i, i);
_local1["secondLane" + i]._x = x * 170;
_local1["secondLane" + i]._y = 315;
i++;
duplicateMovieClip (firstlogLane, "firstlogLane" + i, i);
_local1["firstlogLane" + i]._x = x * 170;
_local1["firstlogLane" + i]._y = 170;
i++;
duplicateMovieClip (secondlogLane, "secondlogLane" + i, i);
_local1["secondlogLane" + i]._x = x * 200;
_local1["secondlogLane" + i]._y = 135;
i++;
x++;
}
x = 0;
while (x < 2) {
duplicateMovieClip (thirdLane, "thirdLane" + i, i);
_local1["thirdLane" + i]._x = x * 200;
_local1["thirdLane" + i]._y = 280;
i++;
duplicateMovieClip (fourthLane, "fourthLane" + i, i);
_local1["fourthLane" + i]._x = x * 200;
_local1["fourthLane" + i]._y = 245;
i++;
duplicateMovieClip (thirdlogLane, "thirdlogLane" + i, i);
_local1["thirdlogLane" + i]._x = x * 220;
_local1["thirdlogLane" + i]._y = 100;
i++;
duplicateMovieClip (fourthlogLane, "fourthlogLane" + i, i);
_local1["fourthlogLane" + i]._x = x * 240;
_local1["fourthlogLane" + i]._y = 65;
i++;
x++;
}
};
placeFrog = function () {
duplicateMovieClip (frog, "frogClip", 1000);
_root.frogClip._x = 200;
_root.frogClip._y = 380;
};
looseLife = function () {
timer = false;
lives--;
death._x = frogClip._x;
death._y = frogClip._y;
removeMovieClip(_root.frogClip);
death.gotoAndPlay(2);
};
levelUp = function () {
if (checkPoints == 5) {
checkPoints = 0;
score = score + 500;
level++;
levelUpClip.gotoAndPlay(2);
lane1Speed = lane1Speed + 0.2;
lane2Speed = lane2Speed + 0.2;
lane3Speed = lane3Speed + 0.2;
lane4Speed = lane4Speed + 0.2;
log1Speed = log1Speed + 0.2;
log2Speed = log2Speed + 0.2;
log3Speed = log3Speed + 0.2;
log4Speed = log4Speed + 0.2;
resetCheckPoints();
}
};
resetCheckPoints = function () {
firstCheck.gotoAndStop(1);
secondCheck.gotoAndStop(1);
thirdCheck.gotoAndStop(1);
fourthCheck.gotoAndStop(1);
fifthCheck.gotoAndStop(1);
firstCheck.flag = false;
secondCheck.flag = false;
thirdCheck.flag = false;
fourthCheck.flag = false;
fifthCheck.flag = false;
};
resetGame();
startGame();
placeFrog();
stop();
Instance of Symbol 33 MovieClip "firstLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "firstLane") {
if (_root.timer) {
this._x = this._x - _root.lane1Speed;
if (this._x < -30) {
this._x = 430 + random(30);
this.gotoAndStop(random(6) + 1);
}
if (this.hitTest(_root.frogClip)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 45 MovieClip "secondLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "secondLane") {
if (_root.timer) {
this._x = this._x + _root.lane2Speed;
if (this._x > 430) {
this._x = -(30 + random(30));
this.gotoAndStop(random(6) + 1);
}
if (this.hitTest(_root.frogClip)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 56 MovieClip "thirdLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "thirdLane") {
if (_root.timer) {
this._x = this._x - _root.lane3Speed;
if (this._x < -30) {
this._x = 430 + random(30);
this.gotoAndStop(random(5) + 1);
}
if (this.hitTest(_root.frogClip)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 65 MovieClip "fourthLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "fourthLane") {
if (_root.timer) {
this._x = this._x + _root.lane4Speed;
if (this._x > 430) {
this._x = -(30 + random(30));
this.gotoAndStop(random(5) + 1);
}
if (this.hitTest(_root.frogClip)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 68 MovieClip "frog" in Frame 6
onClipEvent (load) {
space = 1;
}
onClipEvent (enterFrame) {
if (((_name != "frog") and (space == 1)) and (_root.timer == true)) {
if (Key.isDown(38)) {
_rotation = 0;
_y = (_y - 35);
space++;
_root.frogSound.gotoAndPlay(2);
}
if (Key.isDown(39)) {
_rotation = 90;
_x = (_x + 35);
space++;
_root.frogSound.gotoAndPlay(2);
}
if (Key.isDown(40) and (_y < 380)) {
_rotation = 180;
_y = (_y + 35);
space++;
_root.frogSound.gotoAndPlay(2);
}
if (Key.isDown(37)) {
_rotation = 270;
_x = (_x - 35);
space++;
_root.frogSound.gotoAndPlay(2);
}
if ((this._x > 390) or (this._x < 10)) {
_root.looseLife();
}
switch (this._y) {
case 170 :
if (((!this.hitTest(_root.firstlogLane11)) and (!this.hitTest(_root.firstlogLane3))) and (!this.hitTest(_root.firstlogLane7))) {
_root.looseLife();
}
break;
case 135 :
if (((!this.hitTest(_root.secondlogLane4)) and (!this.hitTest(_root.secondlogLane12))) and (!this.hitTest(_root.secondlogLane8))) {
_root.looseLife();
}
break;
case 100 :
if ((!this.hitTest(_root.thirdlogLane19)) and (!this.hitTest(_root.thirdlogLane15))) {
_root.looseLife();
}
break;
case 65 :
if ((!this.hitTest(_root.fourthlogLane20)) and (!this.hitTest(_root.fourthlogLane16))) {
_root.looseLife();
}
break;
case 30 :
if (!(((((!this.hitTest(_root.firstCheck)) and (!this.hitTest(_root.secondCheck))) and (!this.hitTest(_root.thirdCheck))) and (!this.hitTest(_root.fourthCheck))) and (!this.hitTest(_root.fifthCheck)))) {
break;
}
_root.looseLife();
}
}
}
onClipEvent (keyUp) {
space = 1;
}
Instance of Symbol 3 MovieClip [log0] "firstlogLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "firstlogLane") {
if (_root.timer) {
this._x = this._x - _root.log1Speed;
if (this._x < -60) {
this._x = 460 + random(30);
}
if (this.hitTest(_root.frogClip)) {
_root.frogClip._x = _root.frogClip._x - _root.log1Speed;
}
}
}
}
Instance of Symbol 3 MovieClip [log0] "secondlogLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "secondlogLane") {
if (_root.timer) {
this._x = this._x + _root.log2Speed;
if (this._x > 460) {
this._x = -(60 + random(30));
}
if (this.hitTest(_root.frogClip)) {
_root.frogClip._x = _root.frogClip._x + _root.log2Speed;
}
}
}
}
Instance of Symbol 3 MovieClip [log0] "thirdlogLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "thirdlogLane") {
if (_root.timer) {
this._x = this._x - _root.log3Speed;
if (this._x < -60) {
this._x = 460 + random(30);
}
if (this.hitTest(_root.frogClip)) {
_root.frogClip._x = _root.frogClip._x - _root.log3Speed;
}
}
}
}
Instance of Symbol 3 MovieClip [log0] "fourthlogLane" in Frame 6
onClipEvent (enterFrame) {
if (_name != "fourthlogLane") {
if (_root.timer) {
this._x = this._x + _root.log4Speed;
if (this._x > 460) {
this._x = -(60 + random(30));
}
if (this.hitTest(_root.frogClip)) {
_root.frogClip._x = _root.frogClip._x + _root.log4Speed;
}
}
}
}
Instance of Symbol 80 MovieClip "timeGraph" in Frame 6
onClipEvent (enterFrame) {
if (_root.timer) {
this._width = this._width - ((0.1 * _root.level) / 2);
if (this._width < 1) {
_root.looseLife();
}
}
}
Instance of Symbol 86 MovieClip "firstCheck" in Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.frogClip)) {
if (!flag) {
flag = true;
this.gotoAndStop(2);
_root.timeGraph._width = 100;
_root.frogClip._x = 200;
_root.frogClip._y = 380;
_root.checkPoints++;
_root.score = _root.score + 100;
_root.levelUp();
} else {
_root.looseLife();
}
}
}
Instance of Symbol 86 MovieClip "secondCheck" in Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.frogClip)) {
if (!flag) {
flag = true;
this.gotoAndStop(2);
_root.timeGraph._width = 100;
_root.frogClip._x = 200;
_root.frogClip._y = 380;
_root.checkPoints++;
_root.score = _root.score + 100;
_root.levelUp();
} else {
_root.looseLife();
}
}
}
Instance of Symbol 86 MovieClip "thirdCheck" in Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.frogClip)) {
if (!flag) {
flag = true;
this.gotoAndStop(2);
_root.timeGraph._width = 100;
_root.frogClip._x = 200;
_root.frogClip._y = 380;
_root.checkPoints++;
_root.score = _root.score + 100;
_root.levelUp();
} else {
_root.looseLife();
}
}
}
Instance of Symbol 86 MovieClip "fourthCheck" in Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.frogClip)) {
if (!flag) {
flag = true;
this.gotoAndStop(2);
_root.timeGraph._width = 100;
_root.frogClip._x = 200;
_root.frogClip._y = 380;
_root.checkPoints++;
_root.score = _root.score + 100;
_root.levelUp();
} else {
_root.looseLife();
}
}
}
Instance of Symbol 86 MovieClip "fifthCheck" in Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.frogClip)) {
if (!flag) {
flag = true;
this.gotoAndStop(2);
_root.timeGraph._width = 100;
_root.frogClip._x = 200;
_root.frogClip._y = 380;
_root.checkPoints++;
_root.score = _root.score + 100;
_root.levelUp();
} else {
_root.looseLife();
}
}
}
Instance of Symbol 109 MovieClip "gameSound" in Frame 6
onClipEvent (enterFrame) {
_root.mySound.setVolume(_root.myslider.ratio);
}
Symbol 18 MovieClip Frame 92
_root.gotoAndStop("gamestart");
Symbol 33 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 35
if (_root.lives > 0) {
_root.timeGraph._width = 100;
_root.timer = true;
_root.placeFrog();
} else {
_root.gameOverClip.gotoAndStop(2);
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 96 Button
on (press) {
this.gotoAndStop(1);
_root.resetGame();
_root.resetCheckPoints();
_root.timer = true;
_root.placeFrog();
}
Symbol 102 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 1
this.ratio = 100;
dragger.onPress = function () {
var _local1 = this;
_local1.startDrag(true, 0, 0, line._width, 0);
_local1.onEnterFrame = function () {
ratio = Math.round(this._x);
_root.ratiovalue = ratio;
};
};
dragger.onRelease = (dragger.onreleaseOutside = stopDrag);
Symbol 109 MovieClip Frame 2
stop();
Symbol 109 MovieClip Frame 3
stop();