Frame 1 (220 B)
percent = int(getBytesLoaded() / getBytesTotal()) * 100;
if (percent > loader._currentFrame) {
loader.play();
} else {
loader.stop();
}
if (loader._currentFrame == loader._totalFrames) {
gotoAndStop (3);
}
Frame 2 (17 B)
gotoAndPlay (1);
Frame 3 (353 B)
s_hit1 = new Sound();
s_hit1.attachSound("hit1");
s_hit2 = new Sound();
s_hit2.attachSound("hit2");
s_hit3 = new Sound();
s_hit3.attachSound("hit3");
s_splat = new Sound();
s_splat.attachSound("splat");
s_swing1 = new Sound();
s_swing1.attachSound("swing1");
s_swing2 = new Sound();
s_swing2.attachSound("swing2");
stopAllSounds();
stop();
Frame 6 (2.45 KiB) ●
function main(run) {
if (run == "init") {
tellTarget ("game.player") {
y = 0;
z = 400;
};
if (terrain_objects == true) {
tellTarget ("game") {
start_z = _root.distance;
i = 1;
while (i <= _root.terrain_object_amount) {
attachMovie("grass", "terrain" + i, start_z);
tellTarget (eval ("_root.game.terrain" + i)) {
_x = (-300 + random(600));
z = _parent.start_z;
_parent.start_z = _parent.start_z + 5;
_y = (z - _root.game._y);
_xscale = (_root.scale + (((_y + _root.game._y) / 400) * (100 - _root.scale)));
_yscale = _xscale;
};
i++;
}
};
}
} else {
tellTarget ("game.player") {
_xscale = (_root.scale + ((z / 400) * (100 - _root.scale)));
_yscale = _xscale;
speed = (_xscale / 100) * _root.speed;
width = (_xscale / 100) * width_default;
if (dir == "left") {
_xscale = (_xscale * -1);
}
_y = ((z + ((_yscale / 100) * y)) - _root.game._y);
};
game.player.swapDepths(game.player.z);
i = 1;
while (i <= _root.objects) {
tellTarget ("game.obj" + i) {
if (z) {
_xscale = (_root.scale + ((z / 400) * (100 - _root.scale)));
}
_yscale = _xscale;
speed = (_xscale / 100) * speed_default;
width = (_xscale / 100) * width_default;
if (dir == "left") {
_xscale = (_xscale * -1);
}
_y = ((z + ((_yscale / 100) * y)) - _root.game._y);
};
game["obj" + i].swapDepths(game["obj" + i].z);
i++;
}
}
}
function hit_enemy(attack) {
tellTarget ("_root.game") {
i = 1;
while (i <= _root.objects) {
obj = eval ("obj" + i);
p_width = player.width * 3;
if ((((((((player._x + p_width) > (obj._x - obj.width)) && (player._x < obj._x)) && (player.dir != "left")) || ((((player._x - p_width) < (obj._x + obj.width)) && (player._x > obj._x)) && (player.dir == "left"))) && ((player.y > (obj.y - obj.height)) && ((player.y - player.height) < obj.y))) && (((player._yscale + 8) > obj._yscale) && ((player._yscale - 8) < obj._yscale))) && (obj.alive != false)) {
if (attack == "smash") {
obj.fling();
obj.hp = obj.hp - (2 + random(2));
} else if (attack == "air_stab") {
obj.hp = obj.hp - 2;
} else {
obj.hp--;
}
obj.gotoAndStop("hit");
}
i++;
}
};
}
Mouse.hide();
stopAllSounds();
gotoAndStop (7);
Frame 7 (219 B)
objects = 0;
enemies = 0;
enemy_spawn = true;
distance = 330;
scale = -300;
score = 0;
hp = 10;
speed = 5;
speed_jump = 15;
speed_chicken = 4;
speed_enemy = 2.5;
main("init");
_quality = "medium";
stop();
Frame 8 (196 B)
if (((substring(_url, 0, 22)) != "http://www.etgames.com") && ((substring(_url, 0, 25)) != "http://www.newgrounds.com")) {
getURL ("http://www.etgames.com", "_blank");
}
Mouse.show();
Frame 9 (13 B)
prevFrame();
Symbol 8 MovieClip [navi_particle] Frame 1 (165 B)
if (speed_y > 2) {
_alpha = (_alpha - 5);
if (_alpha < 1) {
this.removeMovieClip();
}
} else {
speed_y = speed_y + 0.1;
}
_y = (_y + speed_y);
Symbol 8 MovieClip [navi_particle] Frame 2 (17 B)
gotoAndPlay (1);
Symbol 22 Button (127 B)
on (rollOver, dragOver) {
cursor.over = true;
}
on (rollOut, dragOut) {
cursor.over = false;
}
on (release) {
nextFrame();
}
Symbol 30 MovieClip Frame 1 (8 B)
stop();
Symbol 31 MovieClip Frame 1 (626 B)
navi._x = _root._xmouse - _x;
navi._y = _root._ymouse - _y;
if (over == true) {
p_spawn_time = 3;
navi.gotoAndStop(2);
} else {
navi.gotoAndStop(1);
p_spawn_time = 6;
}
if (p_spawn == 0) {
Mouse.hide();
p_spawn = -1;
particles++;
this.attachMovie("navi_particle", "p" + particles, particles);
this["p" + particles]._x = (navi._x - 5) + random(10);
this["p" + particles]._y = (navi._y + 5) + random(5);
this["p" + particles]._xscale = 100 + random(60);
this["p" + particles]._yscale = this["p" + particles]._xscale;
} else if (p_spawn > 0) {
p_spawn--;
} else {
p_spawn = p_spawn_time;
}
Symbol 31 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 36 MovieClip Frame 32 (8 B)
stop();
Symbol 40 Button (131 B)
on (rollOver, dragOver) {
cursor.over = true;
}
on (rollOut, dragOut) {
cursor.over = false;
}
on (release) {
gotoAndStop (6);
}
Symbol 47 MovieClip Frame 1 (255 B)
if (_parent.dir == "right") {
_parent._x = _parent._x + _parent.speed;
} else {
_parent._x = _parent._x - _parent.speed;
}
if ((_parent._x < (-70 - _root.game._x)) || (_parent._x > (620 - _root.game._x))) {
_parent.gotoAndStop("limbo");
}
Symbol 47 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 57 MovieClip Frame 25 (30 B)
_parent.gotoAndStop("limbo");
Symbol 58 MovieClip Frame 1 (90 B)
if (_parent.idle == 0) {
_parent.gotoAndStop("respawn");
} else {
_parent.idle--;
}
Symbol 58 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 59 MovieClip Frame 1 (214 B)
if (ini != true) {
ini = true;
speed_default = _root.speed_chicken;
width_default = _width / 2;
height = _height;
_root.objects++;
_name = ("obj" + _root.objects);
gotoAndStop (3);
}
alive = true;
Symbol 59 MovieClip Frame 2 (72 B)
alive = false;
_root.s_splat.start();
_root.score = _root.score + 50;
Symbol 59 MovieClip Frame 3 (42 B)
idle = 800 + random(800);
alive = false;
Symbol 59 MovieClip Frame 4 (208 B)
y = 0;
z = _root.distance + random(400 - _root.distance);
if (random(2) == 1) {
_x = (600 - _root.game._x);
dir = "left";
} else {
_x = (-50 - _root.game._x);
dir = "right";
}
gotoAndStop (1);
Symbol 69 MovieClip Frame 1 (3.37 KiB) ●
if (_parent.invincible == true) {
if (_parent.switch_alpha > 0) {
_parent.switch_alpha--;
} else {
_parent.switch_alpha = 5;
if (_parent._alpha == 100) {
_parent._alpha = 40;
} else {
_parent._alpha = 100;
}
}
if (_parent.invincible_timer == 0) {
_parent.invincible = false;
_parent.alive = true;
_parent._alpha = 100;
} else {
_parent.invincible_timer--;
}
}
if (Key.isDown(39)) {
if (_parent.press_right != true) {
_parent.tap_right = _parent.tap_right + 20;
}
_parent.press_right = true;
} else {
_parent.press_right = false;
}
if (_parent.tap_right > 0) {
_parent.tap_right--;
}
if (Key.isDown(37)) {
if (_parent.press_left != true) {
_parent.tap_left = _parent.tap_left + 20;
}
_parent.press_left = true;
} else {
_parent.press_left = false;
}
if (_parent.tap_left > 0) {
_parent.tap_left--;
}
if (_parent._currentFrame < 4) {
if (Key.isDown(83)) {
if ((_parent.press_jump != true) && (_parent.jumping != true)) {
_parent.gotoAndStop("jump");
}
_parent.press_jump = true;
} else {
_parent.press_jump = false;
}
if (Key.isDown(65)) {
if (_parent.press_attack != true) {
if ((_parent.jumping != true) && (((_parent.dir != "left") && (_parent.tap_right > 20)) || ((_parent.dir == "left") && (_parent.tap_left > 20)))) {
_parent.gotoAndStop("attack3");
} else if ((_parent.jumping == true) && (((_parent.dir != "left") && (_parent.tap_right > 0)) || ((_parent.dir == "left") && (_parent.tap_left > 0)))) {
_parent.gotoAndStop("attack2");
} else if (_parent.jumping != true) {
_parent.gotoAndStop("attack");
}
_parent.tap_right = 0;
_parent.tap_left = 0;
}
_parent.press_attack = true;
} else {
_parent.press_attack = false;
}
if (Key.isDown(39) && (!Key.isDown(37))) {
_parent._x = _parent._x + _parent.speed;
if (_parent.jumping != true) {
_parent.dir = "right";
}
}
if (Key.isDown(37) && (!Key.isDown(39))) {
_parent._x = _parent._x - _parent.speed;
if (_parent.jumping != true) {
_parent.dir = "left";
}
}
_parent.speed = _parent.speed / 5;
if (Key.isDown(40) && (!Key.isDown(38))) {
_parent.z = _parent.z + _parent.speed;
}
if (Key.isDown(38) && (!Key.isDown(40))) {
_parent.z = _parent.z - _parent.speed;
}
if ((((Key.isDown(39) && (!Key.isDown(37))) || (Key.isDown(37) && (!Key.isDown(39)))) || ((Key.isDown(40) && (!Key.isDown(38))) && (_parent.z < 400))) || ((Key.isDown(38) && (!Key.isDown(40))) && (_parent.z > _root.distance))) {
if (_parent._currentFrame == 1) {
_parent.gotoAndStop("walk");
}
} else if (_parent._currentFrame == 2) {
_parent.gotoAndStop("stand");
}
}
if (_parent.jumping == true) {
_parent.y = _parent.y + _parent.speed_y;
_parent.speed_y = _parent.speed_y + 0.5;
if (_parent.y > 0) {
_parent.jumping = false;
_parent.y = 0;
if (_parent._currentFrame == 3) {
_parent.gotoAndStop("stand");
}
}
}
if (_parent._x > (525 - _root.game._x)) {
_parent._x = 525 - _root.game._x;
} else if (_parent._x < (25 - _root.game._x)) {
_parent._x = 25 - _root.game._x;
}
if (_parent.z > 400) {
_parent.z = 400;
} else if (_parent.z < _root.distance) {
_parent.z = _root.distance;
}
Symbol 69 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 97 MovieClip Frame 6 (19 B)
_root.hit_enemy();
Symbol 97 MovieClip Frame 9 (30 B)
_parent.gotoAndStop("stand");
Symbol 99 MovieClip Frame 4 (29 B)
_root.hit_enemy("air_stab");
Symbol 99 MovieClip Frame 8 (107 B)
if (_parent.jumping == true) {
_parent.gotoAndStop("jump");
} else {
_parent.gotoAndStop("stand");
}
Symbol 102 MovieClip Frame 3 (26 B)
_root.hit_enemy("smash");
Symbol 102 MovieClip Frame 9 (30 B)
_parent.gotoAndStop("stand");
Symbol 105 MovieClip Frame 6 (271 B)
if (_parent.jumping != true) {
if (_root.hp < 1) {
_parent.gotoAndStop("die");
} else {
_parent.gotoAndStop("stand");
}
} else if (_parent.dir == "left") {
_parent._x = _parent._x + _parent.speed;
} else {
_parent._x = _parent._x - _parent.speed;
}
Symbol 105 MovieClip Frame 7 (32 B)
gotoAndPlay(_currentframe - 1);
Symbol 108 MovieClip Frame 110 (29 B)
_root.zelda.play();
stop();
Symbol 109 MovieClip Frame 1 (223 B)
if (ini != true) {
ini = true;
width_default = _width / 2;
height = 90;
}
if (alive == false) {
if (invincible != true) {
invincible = true;
invincible_timer = 120;
}
} else {
alive = true;
}
stop();
Symbol 109 MovieClip Frame 3 (75 B)
if (jumping != true) {
jumping = true;
speed_y = -_root.speed_jump;
}
Symbol 109 MovieClip Frame 4 (44 B)
_root["s_swing" + (random(2) + 1)].start();
Symbol 109 MovieClip Frame 5 (44 B)
_root["s_swing" + (random(2) + 1)].start();
Symbol 109 MovieClip Frame 6 (157 B)
strike = (_yscale / 100) * 25;
if (dir == "left") {
_x = (_x - strike);
} else {
_x = (_x + strike);
}
_root["s_swing" + (random(2) + 1)].start();
Symbol 109 MovieClip Frame 7 (179 B)
alive = false;
_root["s_hit" + (random(2) + 1)].start();
if ((_root.hp < 1) && (jumping != true)) {
gotoAndStop (8);
} else {
speed_y = -9;
jumping = true;
}
Symbol 111 MovieClip Frame 1 (106 B)
_parent.raindrops++;
this.swapDepths(1000 + _parent.raindrops);
gotoAndPlay(_totalframes - random(25));
Symbol 111 MovieClip Frame 15 (40 B)
gotoAndPlay(_totalframes - random(25));
Symbol 111 MovieClip Frame 41 (17 B)
gotoAndPlay (2);
Symbol 116 MovieClip Frame 1 (2.17 KiB) ●
if ((_parent._x + _root.speed_enemy) < _parent.dest_x) {
_parent._x = _parent._x + _parent.speed;
_parent.dir = "right";
} else if ((_parent._x - _root.speed_enemy) > _parent.dest_x) {
_parent._x = _parent._x - _parent.speed;
_parent.dir = "left";
} else {
_parent.dest_x = _parent._x;
if (_parent.follow != true) {
if (_parent.stop_time == 0) {
_parent.stop_time = -1;
_parent.dest_x = random(550) - _root.game._x;
} else if (_parent.stop_time > 0) {
_parent.stop_time--;
} else {
_parent.stop_time = random(100);
}
}
}
if ((_parent._x != _parent.dest_x) || ((_parent.follow == true) && (_parent.walking == true))) {
if (_parent._currentFrame == 1) {
_parent.gotoAndStop("walk");
}
} else if (_parent._currentFrame == 2) {
_parent.gotoAndStop("stand");
}
if (_parent.alert_timer > 0) {
_parent.alert_timer--;
} else if (_parent.alert_timer == undefined) {
_parent.alert_timer = random(600);
}
if (_parent.follow != true) {
if ((((_parent._yscale + 20) > _root.game.player._yscale) && ((_parent._yscale - 20) < _root.game.player._yscale)) || (_parent.alert_timer == 0)) {
_parent.follow = true;
}
} else if (_root.game.player.alive != false) {
_parent.dest_x = _root.game.player._x;
_parent.speed_z = _parent.speed / 5;
_parent.walking = true;
if ((_parent._yscale + _parent.speed) < _root.game.player._yscale) {
_parent.z = _parent.z + _parent.speed_z;
} else if ((_parent._yscale - _parent.speed) > _root.game.player._yscale) {
_parent.z = _parent.z - _parent.speed_z;
}
} else {
_parent.walking = false;
}
if ((((((_parent._x + _parent.width) > (_root.game.player._x - _root.game.player.width)) && ((_parent._x - _parent.width) < (_root.game.player._x + _root.game.player.width))) && ((_parent.y > (_root.game.player.y - _root.game.player.height)) && ((_parent.y - _parent.height) < _root.game.player.y))) && (((_parent._yscale + 8) > _root.game.player._yscale) && ((_parent._yscale - 8) < _root.game.player._yscale))) && (_root.game.player.alive != false)) {
_root.hp--;
_root.game.player.gotoAndStop("hit");
}
Symbol 116 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 121 MovieClip Frame 8 (110 B)
if (_parent.jumping != true) {
_parent.gotoAndStop("stand");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 122 MovieClip Frame 1 (747 B)
if (_parent.jumping == true) {
_parent.y = _parent.y + _parent.speed_y;
_parent.speed_y++;
if (_parent.y > 0) {
_parent.jumping = false;
_parent.y = 0;
}
speed_rotation = (_parent._yscale / 100) * (_parent.speed_y * 2);
if (speed_rotation < 0) {
speed_rotation = speed_rotation * -1;
}
if (_parent.dir == "left") {
_parent._x = _parent._x + (_parent.speed * 2);
} else {
_parent._x = _parent._x - (_parent.speed * 2);
speed_rotation = -speed_rotation;
}
_parent.enemy._rotation = _parent.enemy._rotation + speed_rotation;
if (_parent.dir_z == "forward") {
_parent.z = _parent.z + (_parent.speed / 2);
} else if (_parent.dir_z == "back") {
_parent.z = _parent.z - (_parent.speed / 2);
}
}
Symbol 122 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 123 MovieClip Frame 25 (30 B)
_parent.gotoAndStop("limbo");
Symbol 124 MovieClip Frame 1 (406 B)
function fling() {
jumping = true;
speed_y = -20;
if (random(4) == 1) {
dir_z = "forward";
} else if (random(4) == 2) {
dir_z = "back";
}
}
if (ini != true) {
ini = true;
speed_default = _root.speed_enemy;
width_default = 30;
height = 80;
_root.objects++;
_root.enemies++;
_name = ("obj" + _root.objects);
gotoAndStop (7);
}
speed_y = 0;
dir_z = false;
alive = true;
Symbol 124 MovieClip Frame 3 (403 B)
alive = false;
if (hp < 1) {
_root.s_splat.start();
gotoAndStop (4);
} else {
shove = (_yscale / 100) * 20;
if (_root.game.player.dir == "left") {
_x = (_x - shove);
} else {
_x = (_x + shove);
}
if (jumping == true) {
_root.s_hit3.start();
_root.score = _root.score + 20;
} else {
_root["s_hit" + (random(2) + 1)].start();
_root.score = _root.score + 5;
}
}
Symbol 124 MovieClip Frame 4 (44 B)
idle = 20;
_root.score = _root.score + 10;
Symbol 124 MovieClip Frame 7 (223 B)
hp = 4;
y = 0;
z = _root.distance + random(400 - _root.distance);
if (random(2) == 1) {
_x = (600 - _root.game._x);
} else {
_x = (-50 - _root.game._x);
}
dest_x = random(550) - _root.game._x;
gotoAndStop (1);
Symbol 133 MovieClip Frame 1 (8 B)
stop();
Symbol 133 MovieClip Frame 166 (33 B)
_parent.gotoAndStop("gameover");
Symbol 134 MovieClip Frame 1 (533 B)
_root.main("");
if (_root.hp < 0) {
_root.hp = 0;
}
_root.hud.gotoAndStop(_root.hp + 1);
if (init_clock != true) {
init_clock = true;
millisecs = 60;
secs = 0;
mins = 2;
}
millisecs--;
if (millisecs == 0) {
if ((mins == 0) && (secs == 0)) {
_root.gotoAndStop("gameover");
} else {
millisecs = 60;
if (secs == 0) {
secs = 59;
mins--;
} else {
secs--;
}
}
}
if (secs < 10) {
seconds = "0" + secs;
} else {
seconds = secs;
}
_root.clock = (mins + ":") + seconds;
Symbol 134 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 172 Button (46 B)
on (release) {
_root.gotoAndStop("scores");
}
Symbol 176 Button (45 B)
on (release) {
_root.gotoAndStop("title");
}
Symbol 177 MovieClip Frame 228 (8 B)
stop();
Instance of Symbol 173 MovieClip in Symbol 177 MovieClip Frame 228 (101 B)
onClipEvent (load) {
if (_root.local == 1) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 188 Button (49 B)
on (release) {
_root.gotoAndStop("game_init");
}
Symbol 189 MovieClip Frame 225 (8 B)
stop();
Symbol 190 MovieClip Frame 1 (61 B)
if (_root.hp > 0) {
stop();
} else {
nextFrame();
}
Symbol 199 Button (476 B)
on (release) {
if (((_root.scoredone == "done") and (_root.score > _root.hiscore20)) and (_root.old_score != _root.score)) {
_root.old_score = _root.score;
_root.hiscore = _root.score;
if (_root.xname eq "Name Here") {
_root.xname = "etgames";
}
loadVariablesNum ((((((("/scores.php?action=sendscore&game=" + _parent.game) + "&hiscore=") + _root.hiscore) + "&xname=") + _root.xname) + "&randx=") + random(100), 0, "POST");
}
_visible = 0;
}
Symbol 202 MovieClip Frame 1 (122 B)
if ((_root.score > _root.hiscore20) and (_root.local == 1)) {
_visible = 1;
} else {
_visible = 0;
stop();
}
Symbol 244 MovieClip Frame 1 (81 B)
if (_root.local == 1) {
_visible = 1;
} else {
_visible = 0;
stop();
}
Symbol 244 MovieClip Frame 2 (133 B)
game = "zelda";
loadVariablesNum ((("/scores.php?action=getscores&game=" + game) + "&randx=") + random(100000), 0, "POST");
Symbol 244 MovieClip Frame 5 (86 B)
if (_root.scoredone == "done") {
nothing = nothing;
} else {
gotoAndPlay (3);
}
Symbol 244 MovieClip Frame 7 (8 B)
stop();