Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
_quality = "LOW";
_quality = "MEDIUM";
_quality = "HIGH";
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 81) {
if ((i++) >= 2) {
i = 0;
}
_quality = ["HIGH", "MEDIUM", "LOW"][i];
}
if (Key.getCode() == 77) {
_root.gotoAndStop("menu");
}
};
Key.addListener(myListener);
Frame 2
stop();
Instance of Symbol 23 MovieClip "man" in Frame 2
onClipEvent (load) {
vx = 0;
vy = 0;
friction = 0.8;
}
onClipEvent (enterFrame) {
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
if (Key.isDown(39)) {
vx = vx + 5;
}
if (Key.isDown(37)) {
vx = vx - 5;
}
if (Key.isDown(40)) {
vy = vy + 5;
}
if (Key.isDown(38)) {
vy = vy - 5;
}
if (this.hitTest(_root.pl1)) {
_root.pl1.inne._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop("game1");
}
} else {
_root.pl1.inne._visible = false;
}
if (this.hitTest(_root.pl2)) {
_root.pl2.inne2._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop("game2");
}
} else {
_root.pl2.inne2._visible = false;
}
if (this.hitTest(_root.pl3)) {
_root.pl3.inne3._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop("game3");
}
} else {
_root.pl3.inne3._visible = false;
}
if (this.hitTest(_root.pl4)) {
_root.pl4.inne4._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop("game4");
}
} else {
_root.pl4.inne4._visible = false;
}
if (_x > 520) {
_x = -19;
}
if (_x < -20) {
_x = 519;
}
if (_y > 620) {
_y = -19;
}
if (_y < -20) {
_y = 619;
}
updateAfterEvent();
}
Frame 3
stop();
reloading = false;
bc = 0;
onMouseDown = function () {
bc++;
_root.bulleet.nextFrame();
if (bc > 1100) {
bc = 1000;
}
duplicateMovieClip ("bullet2", "b" + bc, bc);
with (_root["b" + bc]) {
spd = 20;
_x = gun._x;
_y = gun._y;
_rotation = _root.gun._rotation;
}
_root["b" + bc].onEnterFrame = function () {
with (this) {
if (_rotation > 180) {
_y = _y + (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x - (spd * Math.sin((Math.PI/180) * _rotation));
} else {
_y = _y - (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x + (spd * Math.sin((Math.PI/180) * _rotation));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
}
};
};
onEnterFrame = function () {
with (gun) {
this.Xd = _root._xmouse - _x;
this.Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
};
Instance of Symbol 40 MovieClip "bullet2" in Frame 3
onClipEvent (load) {
spd = 20;
_x = _root.gun._x;
_y = _root.gun._y;
_rotation = _root.gun._rotation;
}
onClipEvent (enterFrame) {
if (_name == "bullet2") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root.pl)) {
_root.nextFrame();
}
}
Instance of Symbol 42 MovieClip "gun" in Frame 3
onClipEvent (enterFrame) {
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
getDepth(1000);
}
Instance of Symbol 23 MovieClip "man" in Frame 3
onClipEvent (enterFrame) {
getDepth(1001);
}
Frame 4
stop();
reloading = false;
bc = 0;
onLoad = function () {
_root.score = 0;
};
onMouseDown = function () {
if (bc < 11) {
bc++;
_root.bulleet.nextFrame();
if (bc > 1100) {
bc = 1000;
}
duplicateMovieClip ("bullet2", "b" + bc, bc);
with (_root["b" + bc]) {
spd = 20;
_x = gun._x;
_y = gun._y;
_rotation = _root.gun._rotation;
}
_root["b" + bc].onEnterFrame = function () {
with (this) {
if (_rotation > 180) {
_y = _y + (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x - (spd * Math.sin((Math.PI/180) * _rotation));
} else {
_y = _y - (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x + (spd * Math.sin((Math.PI/180) * _rotation));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
}
};
}
};
onEnterFrame = function () {
_root.score++;
with (gun) {
this.Xd = _root._xmouse - _x;
this.Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (Key.isDown(82) && (reloading == false)) {
_root.reload.play();
reloading = true;
}
};
Instance of Symbol 40 MovieClip "bullet2" in Frame 4
onClipEvent (load) {
spd = 20;
_x = _root.gun._x;
_y = _root.gun._y;
_rotation = _root.gun._rotation;
}
onClipEvent (enterFrame) {
if (_name == "bullet2") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root.e1)) {
_root.e1._x = random(500);
_root.e1._y = random(-50);
_root.e1.speed = random(7) + 2;
}
if (this.hitTest(_root.e2)) {
_root.e2._x = random(500);
_root.e2._y = random(-50);
_root.e2.speed = random(7) + 2;
}
if (this.hitTest(_root.e3)) {
_root.e3._x = random(500);
_root.e3._y = random(-50);
_root.e3.speed = random(7) + 2;
}
if (this.hitTest(_root.e4)) {
_root.e4._x = random(500);
_root.e4._y = random(-50);
_root.e4.speed = random(7) + 2;
}
if (this.hitTest(_root.e5)) {
_root.e5._x = random(500);
_root.e5._y = random(-50);
_root.e5.speed = random(7) + 2;
}
if (this.hitTest(_root.e6)) {
_root.e6._x = random(500);
_root.e6._y = random(-50);
_root.e6.speed = random(7) + 2;
}
if (this.hitTest(_root.e7)) {
_root.e7._x = random(500);
_root.e7._y = random(-50);
_root.e7.speed = random(7) + 2;
}
if (this.hitTest(_root.e8)) {
_root.e8._x = random(500);
_root.e8._y = random(-50);
_root.e8.speed = random(7) + 2;
}
}
Instance of Symbol 64 MovieClip "hp" in Frame 4
onClipEvent (load) {
health = 200;
}
onClipEvent (enterFrame) {
_width = health;
if (health == 0) {
_root.nextFrame();
}
}
Instance of Symbol 66 MovieClip "e6" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 66 MovieClip "e5" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 66 MovieClip "e4" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 66 MovieClip "e3" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 66 MovieClip "e2" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 66 MovieClip "e1" in Frame 4
onClipEvent (load) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
onClipEvent (enterFrame) {
this._y = this._y + speed;
if (this._y >= 650) {
_root.nextFrame();
}
if (_root.bullet2.hitTest(this)) {
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
if (_y >= 430) {
_root.hp.health = _root.hp.health - 10;
this._x = random(500);
this._y = random(-50);
speed = random(7) + 2;
}
}
Instance of Symbol 42 MovieClip "gun" in Frame 4
onClipEvent (enterFrame) {
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
}
onClipEvent (load) {
vx = 0;
vy = 0;
friction = 0.8;
}
onClipEvent (enterFrame) {
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
if (Key.isDown(68) || (Key.isDown(39))) {
vx = vx + 3;
}
if (Key.isDown(65) || (Key.isDown(37))) {
vx = vx - 3;
}
if (Key.isDown(83) || (Key.isDown(40))) {
vy = vy + 3;
}
if (Key.isDown(87) || (Key.isDown(38))) {
vy = vy - 3;
}
if (this.hitTest(_root.pl)) {
_root.pl.inne._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop(random(2) + 2);
}
} else {
_root.pl.inne._visible = false;
}
updateAfterEvent();
this.getDepth(101);
}
Instance of Symbol 23 MovieClip "man" in Frame 4
onClipEvent (load) {
vx = 0;
vy = 0;
friction = 0.8;
}
onClipEvent (enterFrame) {
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
if (Key.isDown(68) || (Key.isDown(39))) {
vx = vx + 3;
}
if (Key.isDown(65) || (Key.isDown(37))) {
vx = vx - 3;
}
if (Key.isDown(83) || (Key.isDown(40))) {
vy = vy + 3;
}
if (Key.isDown(87) || (Key.isDown(38))) {
vy = vy - 3;
}
if (this.hitTest(_root.pl)) {
_root.pl.inne._visible = true;
if (Key.isDown(65)) {
_root.gotoAndStop(random(2) + 2);
}
} else {
_root.pl.inne._visible = false;
}
updateAfterEvent();
this.getDepth(101);
}
Instance of Symbol 68 MovieClip "cursor" in Frame 4
onClipEvent (enterFrame) {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
updateAfterEvent();
}
Frame 5
stop();
reloading = false;
bc = 0;
onMouseDown = function () {
bc++;
_root.bulleet.nextFrame();
if (bc > 1100) {
bc = 1000;
}
duplicateMovieClip ("bullet2", "b" + bc, bc);
with (_root["b" + bc]) {
spd = 20;
_x = gun._x;
_y = gun._y;
_rotation = _root.gun._rotation;
}
_root["b" + bc].onEnterFrame = function () {
with (this) {
if (_rotation > 180) {
_y = _y + (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x - (spd * Math.sin((Math.PI/180) * _rotation));
} else {
_y = _y - (spd * Math.cos((Math.PI/180) * _rotation));
_x = _x + (spd * Math.sin((Math.PI/180) * _rotation));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
}
};
};
onEnterFrame = function () {
with (gun) {
this.Xd = _root._xmouse - _x;
this.Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
};
Mouse.show();
Instance of Symbol 40 MovieClip "bullet2" in Frame 5
onClipEvent (load) {
spd = 20;
_x = _root.gun._x;
_y = _root.gun._y;
_rotation = _root.gun._rotation;
}
onClipEvent (enterFrame) {
if (_name == "bullet2") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root.pl)) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 42 MovieClip "gun" in Frame 5
onClipEvent (enterFrame) {
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
getDepth(1000);
}
Instance of Symbol 23 MovieClip "man" in Frame 5
onClipEvent (enterFrame) {
getDepth(1001);
}
Frame 6
stop();
Frame 7
_root.score = 0;
_root.scoree = 0;
_root.timer = 120;
onEnterFrame = function () {
if (_root.timer == 0) {
_root.nextFrame();
}
};
Instance of Symbol 93 MovieClip "paddley" in Frame 7
onClipEvent (load) {
this._y = 390;
this._x = 275;
this.paddlespeed = 15;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
Mouse.hide();
}
Instance of Symbol 97 MovieClip "paddlez" in Frame 7
onClipEvent (load) {
this._y = 5;
this._x = 275;
this.paddlespeed = 5;
}
onClipEvent (enterFrame) {
if (this._x > (_root.ball._x + 5)) {
this._x = this._x - this.paddlespeed;
}
if (this._x < (_root.ball._x - 5)) {
this._x = this._x + this.paddlespeed;
}
}
Instance of Symbol 99 MovieClip "ball" in Frame 7
onClipEvent (load) {
function reset() {
this._x = 275;
this._y = 200;
this.fullspeed = 14;
this.xspeed = 0;
this.yspeed = 9;
this.udist = 0;
this.edist = 0;
this.ufraction = 0;
this.efraction = 0;
}
this.reset();
}
onClipEvent (enterFrame) {
_rotation = ((_x * 360) / 550);
if ((this._x >= 525) && (this.xspeed > 0)) {
this.xspeed = -this.xspeed;
}
if ((this._x <= 25) && (this.xspeed < 0)) {
this.xspeed = -this.xspeed;
}
if (this.hitTest(_root.paddley)) {
this.udist = _root.paddley._x - _root.ball._x;
if (this.udist != 0) {
this.ufraction = this.udist / (_root.paddley._width / 2);
this.xspeed = -((1 - Math.abs(this.ufraction)) * this.fullspeed);
this.yspeed = this.ufraction * this.fullspeed;
} else if (this.udist == 0) {
this.yspeed = -this.fullspeed;
}
if (this.yspeed > 0) {
this.yspeed = -this.yspeed;
}
}
if (this.hitTest(_root.paddlez)) {
this.edist = _root.paddlez._x - this._x;
if (this.edist != 0) {
this.efraction = this.edist / (_root.paddlez._width / 2);
this.xspeed = -((1 - Math.abs(this.efraction)) * this.fullspeed);
this.yspeed = this.efraction * this.fullspeed;
} else {
this.yspeed = this.fullspeed;
}
if (this.yspeed < 0) {
this.yspeed = -this.yspeed;
}
}
this._y = this._y + this.yspeed;
this._x = this._x + this.xspeed;
if (this._y > 440) {
reset();
_root.scoree = _root.scoree + 1;
}
if (this._y < -40) {
reset();
_root.score = _root.score + 1;
}
}
Instance of Symbol 71 MovieClip in Frame 8
on (press) {
_root.gotoAndStop("game2");
}
Frame 9
stop();
Frame 10
stop();
Instance of Symbol 3 MovieClip [hero] "hero" in Frame 10
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.trig.hitTest(_x, _y, true)) {
_root.trig.gotoAndStop(2);
_root.environment.gotoAndStop(2);
}
}
Instance of Symbol 118 MovieClip "next1" in Frame 10
onClipEvent (load) {
if (this.hitTest(_root.hero)) {
_root.nextFrame();
}
}
Frame 11
stop();
_root.environment.gotoAndStop(3);
_root.trig.gotoAndStop(1);
_root.next1.gotoAndStop(2);
Instance of Symbol 3 MovieClip [hero] "hero" in Frame 11
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.trig.hitTest(_x, _y, true)) {
_root.trig.gotoAndStop(2);
_root.environment.gotoAndStop(2);
_root.next1.gotoAndStop(1);
}
}
Frame 12
_root.environment.gotoAndStop(4);
_root.trig.gotoAndStop(1);
_root.next1.gotoAndStop(2);
Instance of Symbol 3 MovieClip [hero] "hero" in Frame 12
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.trig.hitTest(_x, _y, true)) {
_root.trig.gotoAndStop(2);
_root.next1.gotoAndStop(1);
}
}
Frame 13
_root.environment.gotoAndStop(4);
_root.trig.gotoAndStop(1);
_root.next1.gotoAndStop(2);
_root.environment2.gotoAndStop(4);
Instance of Symbol 118 MovieClip "next1" in Frame 13
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
_root.nextFrame();
}
}
Instance of Symbol 3 MovieClip [hero] "hero" in Frame 13
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.environment1.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.trig.hitTest(_x, _y, true)) {
_root.trig.gotoAndStop(2);
_root.next1.gotoAndStop(1);
_root.environment1.gotoAndStop(2);
}
}
Frame 14
_root.trig.gotoAndStop(1);
_root.next1.gotoAndStop(2);
_root.environment2.gotoAndStop(4);
Instance of Symbol 3 MovieClip [hero] "hero" in Frame 14
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.en3.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.en2.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.en1.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
_x = 450;
_y = 50;
}
if (_root.trig.hitTest(_x, _y, true)) {
_root.trig.gotoAndStop(2);
_root.en1.gotoAndStop(2);
_root.next1.gotoAndStop(1);
}
if (_root.trig2.hitTest(_x, _y, true)) {
_root.trig2.gotoAndStop(2);
_root.en3.gotoAndStop(2);
}
if (_root.trig3.hitTest(_x, _y, true)) {
_root.trig3.gotoAndStop(2);
_root.en2.gotoAndStop(2);
}
}
Frame 15
stop();
Frame 16
stop();
score = 0;
Instance of Symbol 133 MovieClip in Frame 16
onClipEvent (load) {
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
gravity = 0.1;
upconstant = 0.75;
friction = 0.99;
_root.coin._x = (Math.random() * 400) + 50;
_root.coin._y = (Math.random() * 250) + 50;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 0.5);
}
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = yspeed + gravity;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if (_root.wall.hitTest(_x, _y, true) and (_alpha >= 100)) {
xspeed = 0;
yspeed = 0;
_x = 50;
_y = 50;
_root.score = _root.score - 2;
if (_root.score < 0) {
_root.score = 0;
}
_alpha = 10;
}
if (_root.environment2.hitTest(_x, _y, true) and (_alpha >= 100)) {
xspeed = 0;
yspeed = 0;
this._x = 79.3;
this._y = 103.3;
_root.lives.nextFrame();
if (_root.score < 0) {
_root.score = 0;
}
_alpha = 10;
}
if (_root.coin.hitTest(this)) {
_root.coin._x = (Math.random() * 400) + 50;
_root.coin._y = (Math.random() * 250) + 50;
_root.score++;
}
if ((this._y > 344.4) and (_alpha >= 100)) {
xspeed = 0;
yspeed = 0;
_root.lives.nextFrame();
if (_root.score < 0) {
_root.score = 0;
}
this._x = 79.3;
this._y = 103.3;
_alpha = 10;
}
if ((this._y < 53.3) and (_alpha >= 100)) {
xspeed = 0;
yspeed = 0;
_root.lives.nextFrame();
if (_root.score < 0) {
_root.score = 0;
}
this._x = 79.3;
this._y = 103.3;
_alpha = 10;
}
}
Instance of Symbol 140 MovieClip "environment2" in Frame 16
onClipEvent (enterFrame) {
_rotation = ((_rotation + 0.1) + (_root.score * 0.1));
}
Instance of Symbol 71 MovieClip "pl" in Frame 17
on (press) {
_root.gotoAndStop("game4");
}
Symbol 3 MovieClip [hero] Frame 1
stop();
Symbol 14 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local4;
if (_local4 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
dt = getTimer() - time;
time = time + dt;
frameAccum = frameAccum + dt;
var _local3 = 0;
while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) {
advanceFrame(tankLogo, true, true);
advanceFrame(loadingText, false, true);
advanceFrame(barGfx, false, true);
if (loadingComplete) {
advanceFrame(this, false, false);
}
(frameAccum = frameAccum - FRAME_TIME);
_local3++;
}
updateAfterEvent();
}
function advanceFrame(clip, recurse, loop) {
if (!clip) {
return(undefined);
}
clip.stop();
if (clip._currentframe == clip._totalframes) {
if (loop) {
clip.gotoAndStop(1);
}
} else {
clip.nextFrame();
}
if (recurse) {
for (childName in clip) {
if (typeof(clip[childName]) == "movieclip") {
advanceFrame(clip[childName], recurse, loop);
}
}
}
}
function startMovie() {
clearInterval(intervalId);
_root.play();
}
_root.stop();
stop();
var FRAME_TIME = 33.3333333333333;
var AUTO_PLAY = false;
var MAX_FRAME_SKIP = 5;
var loadingComplete;
var intervalId;
var time;
var frameAccum;
loadingComplete = false;
intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2);
frameAccum = 0;
time = getTimer();
timerHandler();
Symbol 14 MovieClip Frame 37
startMovie();
Symbol 42 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
_root.bc = 11;
_root.bulleet.rel._visible = false;
Symbol 52 MovieClip Frame 15
_root.reloading = false;
_root.bc = 0;
_root.bulleet.gotoAndStop(1);
_root.bulleet.rel._visible = false;
Symbol 62 MovieClip Frame 1
stop();
Symbol 80 Button
on (press) {
gotoAndStop ("story");
}
Symbol 82 Button
on (press) {
nextFrame();
}
Symbol 84 Button
on (press) {
gotoAndPlay (1);
}
Symbol 103 MovieClip Frame 30
_root.timer--;
Symbol 112 Button
on (release) {
_root.nextFrame();
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
stop();
Symbol 118 MovieClip Frame 1
stop();
if (this.hitTest(_root.hero)) {
_root.nextFrame();
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
_root.nextFrame();
}
}
Symbol 118 MovieClip Frame 2
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 3
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 6
_root.nextFrame();