Combined Code
frame 1 {
stop();
}
movieClip 6 {
}
button 8 {
on (release) {
gotoAndStop(2);
}
}
frame 2 {
stop();
}
movieClip 19 {
}
movieClip 20 {
frame 1 {
stop();
}
frame 2 {
stop();
}
instance player2 of movieClip 6 {
onClipEvent (enterFrame) {
if (_root.ENEMIES.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
}
instance player of movieClip 20 {
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
power = 3;
friction = 0.9300000000000001;
}
onClipEvent (enterFrame) {
if (Key.isDown(39)) {
xspeed += power;
}
if (Key.isDown(37)) {
xspeed -= power;
}
if (Key.isDown(38)) {
yspeed += power;
}
if (Key.isDown(40)) {
yspeed -= power;
}
if (Key.isDown(32)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
_x = _x + xspeed;
_y = _y - yspeed;
xspeed *= friction;
yspeed *= friction;
}
}
movieClip 22 {
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (_root.player.gun.hitTest(this) or this._x < -300) {
_x = 700;
_y = Math.floor(Math.random() * 400) + 0;
} else {
_x = _x - 10;
}
if (_root.player.player1.hitTest(this)) {
_root.gotoAndStop(3);
}
if (_root.player.player2.hitTest(this)) {
_root.gotoAndStop(3);
}
}
}
frame 3 {
stop();
}
button 25 {
on (release) {
gotoAndStop(2);
}
}