Frame 1
resetGame = function () {
i = 1;
timer = true;
lane1Speed = 3;
lane2Speed = 6;
lane3Speed = 5;
checkPoints = 0;
};
startGame = function () {
x = 0;
while (x < 5) {
duplicateMovieClip (firstLane, "firstLane" + i, i);
_root["firstLane" + i]._x = x * 120;
_root["firstLane" + i]._y = 240;
i++;
duplicateMovieClip (secondLane, "secondLane" + i, i);
_root["secondLane" + i]._x = x * 170;
_root["secondLane" + i]._y = 190;
i++;
x++;
}
x = 0;
while (x < 2) {
duplicateMovieClip (thirdLane, "thirdLane" + i, i);
_root["thirdLane" + i]._x = x * 220;
_root["thirdLane" + i]._y = 140;
i++;
x++;
}
};
placeFrog = function () {
duplicateMovieClip (frog, "frogClip", 1);
_root.frogClip._x = 375;
_root.frogClip._y = 270;
};
looseLife = function () {
timer = true;
lives--;
death._x = frogClip._x;
death._y = frogClip._y;
removeMovieClip(_root.frogClip);
death.gotoAndPlay(2);
};
_root.attachMovie("control", control, 900);
_root.control._x = _root._x;
_root.control._y = _root._y;
resetGame();
startGame();
placeFrog();
stop();
Instance of Symbol 43 MovieClip "firstLane" in Frame 1
onClipEvent (enterFrame) {
if (_name != "firstLane") {
if (_root.timer) {
this._x = this._x - _root.lane1Speed;
if (this._x < -30) {
this._x = 800 + random(30);
this.gotoAndStop(random(6) + 1);
}
if (this.hitTest(_root.frogClip.hit)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 44 MovieClip "secondLane" in Frame 1
onClipEvent (enterFrame) {
if (_name != "secondLane") {
if (_root.timer) {
this._x = this._x + _root.lane2Speed;
if (this._x > 800) {
this._x = -(30 + random(30));
this.gotoAndStop(random(6) + 1);
}
if (this.hitTest(_root.frogClip.hit)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 45 MovieClip "thirdLane" in Frame 1
onClipEvent (enterFrame) {
if (_name != "thirdLane") {
if (_root.timer) {
this._x = this._x - _root.lane3Speed;
if (this._x < -30) {
this._x = 800 + random(30);
this.gotoAndStop(random(5) + 1);
}
if (this.hitTest(_root.frogClip.hit)) {
_root.looseLife();
}
}
}
}
Instance of Symbol 37 MovieClip [frog] "frog" in Frame 1
onClipEvent (load) {
space = 1;
}
onClipEvent (enterFrame) {
if (((_name != "frog") and (space == 1)) and (_root.timer == true)) {
if (Key.isDown(38) and (_y > 35)) {
_rotation = 0;
_y = (_y - 50);
space++;
}
if (Key.isDown(39) and (_x < 690)) {
_rotation = 90;
_x = (_x + 50);
space++;
}
if (Key.isDown(40) and (_y < 270)) {
_rotation = 180;
_y = (_y + 50);
space++;
}
if (Key.isDown(37) and (_x > 25)) {
_rotation = 270;
_x = (_x - 50);
space++;
}
}
}
onClipEvent (keyUp) {
space = 1;
}
onClipEvent (keyUp) {
if (this.hitTest(_root.successhit)) {
_root.attachMovie("success", success, 1000);
_root.success._x = _root._x;
_root.success._y = _root._y;
removeMovieClip(_root.frogClip);
}
}
Symbol 6 MovieClip [success] Frame 1
Symbol 6 MovieClip [success] Frame 30
getURL (_root.clickTag, "_blank");
_root.placeFrog();
this.removeMovieClip();
Symbol 12 MovieClip Frame 8
stop();
Symbol 17 MovieClip Frame 8
stop();
Symbol 18 Button
on (release) {
getURL (_root.clickTag, "_blank");
}
Symbol 19 Button
on (release) {
_root.placeFrog();
this.removeMovieClip();
}
Symbol 20 Button
on (release) {
getURL (_root.clickTag, "_blank");
_root.placeFrog();
this.removeMovieClip();
}
Symbol 21 MovieClip [playMore] Frame 1
Symbol 21 MovieClip [playMore] Frame 23
stop();
Symbol 25 Button
on (press) {
if (_root.frogClip._y > 35) {
_root.frogClip._rotation = 0;
_root.frogClip._y = _root.frogClip._y - 50;
space++;
}
if (_root.frogClip.hitTest(_root.successhit)) {
_root.attachMovie("success", success, 1000);
_root.success._x = _root._x;
_root.success._y = _root._y;
removeMovieClip(_root.frogClip);
}
}
Symbol 27 Button
on (press) {
if (_root.frogClip._x < 690) {
_root.frogClip._rotation = 90;
_root.frogClip._x = _root.frogClip._x + 50;
space++;
}
}
Symbol 29 Button
on (press) {
if (_root.frogClip._y < 270) {
_root.frogClip._rotation = 180;
_root.frogClip._y = _root.frogClip._y + 50;
space++;
}
}
Symbol 31 Button
on (press) {
if (_root.frogClip._x > 25) {
_root.frogClip._rotation = 270;
_root.frogClip._x = _root.frogClip._x - 50;
space++;
}
}
Symbol 38 Button
on (release) {
getURL (_root.clickTag, "_blank");
}
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 25
_root.attachMovie("playMore", playMore, 1000);
_root.playMore._x = _root._x;
_root.playMore._y = _root._y;