Frame 1
Stage.showMenu = false;
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 1
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Instance of Symbol 124 MovieClip "shot_mc" in Frame 4
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 4
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 4
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 5
stop();
Instance of Symbol 124 MovieClip "shot_mc" in Frame 5
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 5
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 5
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 5
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 6
stop();
Instance of Symbol 124 MovieClip "shot_mc" in Frame 6
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 6
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 6
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 6
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 7
stop();
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 7
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 7
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 7
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 7
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 8
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 8
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 8
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 8
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 8
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 9
stop();
Instance of Symbol 142 MovieClip "player_mc" in Frame 9
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 9
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 9
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 9
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 9
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 10
stop();
Instance of Symbol 142 MovieClip "player_mc" in Frame 10
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 10
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 10
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 10
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 10
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 11
stop();
Instance of Symbol 142 MovieClip "player_mc" in Frame 11
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 11
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 11
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 11
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 11
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 12
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 12
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 12
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 12
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 12
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 13
stop();
Instance of Symbol 124 MovieClip "shot_mc" in Frame 13
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 13
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 13
onClipEvent (load) {
healthMax = 500;
speedMax = 5;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 100;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 13
onClipEvent (load) {
health = 200;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 13
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 14
stop();
Instance of Symbol 146 MovieClip in Frame 14
onClipEvent (load) {
health = 300;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 124 MovieClip "shot_mc" in Frame 14
onClipEvent (load) {
speed = 13;
damageMin = 25;
damageMax = 50;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.shot_mc.hit = true;
_root.shot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else {
i = 1;
while (i <= _root.enemyCount) {
if (this.hitTest(_root["enemy_mc" + i])) {
hitFunc();
_root["enemy_mc" + i].health = _root["enemy_mc" + i].health - (damageMin + random(damageMax - damageMin));
break;
}
i++;
}
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.block.hitTest(this)) {
_root.nextScene();
}
}
Instance of Symbol 4 MovieClip "enemyshot_mc" in Frame 14
onClipEvent (load) {
speed = 13;
damageMin = 5;
damageMax = 25;
hit = false;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_root.enemyshot_mc.hit = true;
_root.enemyshot_mc._visible = false;
hitFunc = function () {
_y = (_y + ySpeed);
_x = (_x - xSpeed);
this.gotoAndPlay("hit");
hit = true;
};
}
onClipEvent (enterFrame) {
if (!hit) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
hitFunc();
} else if (this.hitTest(_root.player_mc)) {
hitFunc();
_root.player_mc.health = _root.player_mc.health - (damageMin + random(damageMax - damageMin));
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
Instance of Symbol 142 MovieClip "player_mc" in Frame 14
onClipEvent (load) {
healthMax = 500;
speedMax = 8;
manuverSpeed = 5;
accel = 3;
decay = 0.9;
bounce = 0.75;
collideDamage = 0.1;
shotMax = 10;
health = healthMax;
xSpeed = 0;
ySpeed = 0;
speed = 0;
shotCount = 0;
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
speed = speed * decay;
xSpeed = speed * Math.sin(_rotation * (Math.PI/180));
ySpeed = speed * Math.cos(_rotation * (Math.PI/180));
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (_root.level_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
health = health - (Math.abs(speed) * collideDamage);
}
if (_root.enemy_mc.hitTest(this._x, this._y, true)) {
_y = (_y + (ySpeed * 1.1));
_x = (_x - (xSpeed * 1.1));
speed = -(speed * bounce);
}
if (Key.isDown(37)) {
this._rotation = this._rotation - manuverSpeed;
} else if (Key.isDown(39)) {
this._rotation = this._rotation + manuverSpeed;
}
if (Key.isDown(38)) {
if (speed < speedMax) {
speed = speed + accel;
}
} else if (Key.isDown(40)) {
if (speed > (-speedMax)) {
speed = speed - accel;
}
}
delta_x = _x - _root._xmouse;
delta_y = _y - _root._ymouse;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
this.turret_mc._rotation = this.turret_mc._rotation - this._rotation;
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
if (_x < 0) {
_x = 500;
}
if (_x > 500) {
_x = 0;
}
if (_y < 0) {
_y = 500;
}
if (_y > 500) {
_y = 0;
}
}
}
onClipEvent (mouseDown) {
if (!death) {
this.turret_mc.gotoAndPlay("shoot");
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip("shot_mc" + shotCount, shotCount);
_root["shot_mc" + shotCount]._x = this._x;
_root["shot_mc" + shotCount]._y = this._y;
_root["shot_mc" + shotCount]._rotation = this.turret_mc._rotation + this._rotation;
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.block)) {
_root.nextFrame();
}
}
Instance of Symbol 146 MovieClip in Frame 14
onClipEvent (load) {
health = 300;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 166 MovieClip "GIR" in Frame 14
onClipEvent (load) {
health = 10000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
onClipEvent (load) {
health = 10;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("GIR" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.enemy_mc._x;
delta_y = _y - _root.enemy_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.shot_mc.duplicateMovieClip((("shot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("shot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 14
onClipEvent (load) {
health = 300;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 146 MovieClip in Frame 14
onClipEvent (load) {
health = 300;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Instance of Symbol 207 MovieClip in Frame 14
onClipEvent (load) {
health = 2000;
refireInterval = 15;
shotMax = 3;
_root.enemyCount++;
ID = _root.enemyCount;
_name = ("enemy_mc" + ID);
death = false;
}
onClipEvent (enterFrame) {
if (!death) {
delta_x = _x - _root.player_mc._x;
delta_y = _y - _root.player_mc._y;
this.turret_mc._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
refire++;
if (refire >= refireInterval) {
refire = 0;
shotCount++;
if (shotCount > shotMax) {
shotCount = 1;
}
_root.enemyshot_mc.duplicateMovieClip((("enemyshot_mc" + ID) + "_") + shotCount, -((3 * ID) + shotCount));
with (_root[(("enemyshot_mc" + ID) + "_") + shotCount]) {
_x = this._x;
_y = this._y;
_rotation = this.turret_mc._rotation;
}
}
if (health <= 0) {
this.gotoAndPlay("death");
death = true;
}
}
}
Frame 15
stop();
Symbol 4 MovieClip Frame 1
stop();
Symbol 4 MovieClip Frame 7
stop();
this.removeMovieClip();
Symbol 100 Button
on (release) {
getURL ("http://www.zimwiki.com", "blank");
}
Symbol 106 Button
on (release) {
_root.play();
}
Symbol 107 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 107 MovieClip Frame 2
gotoAndPlay (1);
Symbol 109 Button
on (release) {
gotoAndPlay (4);
}
Symbol 111 Button
on (release) {
nextFrame();
}
Symbol 114 Button
on (release) {
nextFrame();
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 11
stop();
this.removeMovieClip();
Symbol 137 MovieClip Frame 1
_root.mainMovie.gotoAndPlay("Scene 1", 2);
Symbol 140 Button
on (release) {
_root.gotoAndPlay("Scene 1", 2);
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 31
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 7
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 7
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 7
stop();
Symbol 212 Button
on (release) {
gotoAndPlay (2);
}