Frame 1
function addObjects() {
i = 2;
while (i < 100) {
_root.object1.duplicateMovieClip("object" + i, 800 + i);
_root["object" + i]._x = _root["object" + i]._x - ((i * 200) - 200);
_root["object" + i].distance.text = "" + i;
i++;
}
i = 2;
while (i < 20) {
_root.objectB1.duplicateMovieClip("objectB" + i, 200 + i);
_root["objectB" + i]._x = _root["objectB" + i]._x - ((i * 600) - 600);
_root["objectB" + i].distance.text = "" + i;
i++;
}
i = 2;
while (i < 30) {
_root.objectC1.duplicateMovieClip("objectC" + i, 100 + i);
_root["objectC" + i]._x = _root["objectC" + i]._x - ((i * 456) - 456);
_root["objectC" + i].distance.text = "" + i;
i++;
}
global_sound.attachSound("pump");
global_sound.start();
}
function removeObjects() {
i = 2;
while (i < 100) {
_root["object" + i].removeMovieClip();
i++;
}
_root.object1._x = 695;
i = 2;
while (i < 20) {
_root["objectB" + i].removeMovieClip();
i++;
}
_root.objectB1._x = 352.4;
i = 2;
while (i < 30) {
_root["objectC" + i].removeMovieClip();
i++;
}
_root.objectC1._x = 272.1;
_root.city._x = 31.5;
_root.clouds._x = -272;
_root.ladder._x = 532;
_root.gun._x = 753.8;
}
stage = 0;
_quality = "LOW";
global_sound = new Sound();
global_sound.setVolume(100);
mouseListener = new Object();
mouseListener.onMouseDown = function () {
trace(stage);
if (stage == 0) {
_root.frog.isActive = 1;
_root.frog.v = -5;
_root.frog.gotoAndStop(2);
global_sound.attachSound("jump");
global_sound.start();
}
if (stage == 1) {
a = _root.frog._y;
b = _root.sweetSpot._y;
c = b + _root.sweetSpot._height;
d = a - b;
e = (a - c) / 4;
if ((a > b) and (a < c)) {
_root.gun.gotoAndPlay(1);
_root.frog.gotoAndStop(3);
global_sound.attachSound("hit");
global_sound.attachSound("shotgun");
global_sound.start();
_root.frog.v = e * 1.5;
_root.frog.h = (-d) - ((e * 2) + (90 + random(150)));
if (_root.frog.h > 0) {
_root.frog.h = 0;
}
} else {
stage = 4;
}
}
if (stage == 3) {
_root.frog.isActive = 0;
_root.frog.v = 0;
_root.frog.h = 0;
_root.frog.gotoAndStop(1);
_root.frog._x = 610;
_root.frog._y = 120;
_root.frog.bounces = 1;
global_sound.stop();
stage = -1;
removeObjects();
addObjects();
}
if (stage < 2) {
stage++;
}
};
Mouse.addListener(mouseListener);
removeObjects();
addObjects();
Instance of Symbol 48 MovieClip "frog" in Frame 1
onClipEvent (load) {
h = 0;
v = 0;
isActive = 0;
swapDepths(400);
bounces = 1;
}
onClipEvent (enterFrame) {
_root.gun._rotation = 130 - (_y / 2);
if (isActive == 1) {
if (v < 60) {
v = v + 1;
}
if (_x > 200) {
_x = (_x + h);
} else {
_x = 200;
i = 1;
while (i <= 100) {
_root["object" + i]._x = _root["object" + i]._x - (h / 3);
i++;
}
i = 1;
while (i <= 20) {
_root["objectB" + i]._x = _root["objectB" + i]._x - (h / 5);
i++;
}
i = 1;
while (i <= 30) {
_root["objectC" + i]._x = _root["objectC" + i]._x - (h / 5);
i++;
}
_root.clouds._x = _root.clouds._x - (h / 300);
_root.city._x = _root.city._x - (h / 100);
_root.ladder._x = _root.ladder._x - h;
_root.gun._x = _root.gun._x - h;
}
if (_root.stage == 2) {
if (_y < 200) {
_rotation = (_rotation - rotspeed);
if (rotspeed < 20) {
rotspeed = rotspeed + 2;
}
} else {
rotspeed = 0;
_rotation = (-(v * 2));
}
}
_y = (_y + v);
if ((_y + v) > 300) {
if (v > 28) {
v = 0;
h = 0;
isActive = 0;
_root.stage = 3;
_root.global_sound.attachSound("bounce" + bounces);
_root.global_sound.start();
_rotation = 0;
gotoAndStop (4);
} else if (v > 1) {
h = h / 1.2;
trace((int(h) + " ") + int(v));
v = (-v) / 1.2;
_root.global_sound.attachSound("bounce" + bounces);
_root.global_sound.start();
bounces = random(6);
if (_root.stage == 1) {
v = 0;
h = 0;
_root.stage = 3;
isActive = 0;
}
} else {
_root.global_sound.attachSound("end");
_root.global_sound.start();
isActive = 0;
_root.stage = 3;
v = 0;
}
}
}
}
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 3
gotoAndStop (1);
Symbol 48 MovieClip Frame 1
stop();