Frame 1
loadpercent = "0%";
Frame 2
loadPercent = Math.floor(((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) - 1) + "%";
loader._width = (Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) / 100) * 270;
if ((_root._framesloaded > 3) || (Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) > 49)) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
loadPercent = Math.floor(((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) - 1) + "%";
loader._width = (Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) / 100) * fullload;
if ((_root.getBytesLoaded() == _root.getBytesTotal()) && (_root.clip._currentframe > 49)) {
loadPercent = "100%";
gotoAndStop ("begin");
}
Frame 5
gotoAndPlay (4);
Frame 6
sound_bttn.onRelease = function () {
if (this._currentframe == 1) {
this.gotoAndStop(2);
_root.beep_Sound.setVolume(0);
_root.bonus_Sound.setVolume(0);
_root.die_Sound.setVolume(0);
_root.explosion_Sound.setVolume(0);
_root.level_Sound.setVolume(0);
_root.over_Sound.setVolume(0);
_root.rocket_Sound.setVolume(0);
_root.shot_Sound.setVolume(0);
} else {
this.gotoAndStop(1);
_root.beep_Sound.setVolume(100);
_root.bonus_Sound.setVolume(100);
_root.die_Sound.setVolume(100);
_root.explosion_Sound.setVolume(100);
_root.level_Sound.setVolume(100);
_root.over_Sound.setVolume(100);
_root.rocket_Sound.setVolume(100);
_root.shot_Sound.setVolume(100);
}
};
numlevel = 1;
score = 0;
health = 100;
energy = 500;
var beep_Sound = new Sound();
beep_Sound.attachSound("beep");
var bonus_Sound = new Sound();
bonus_Sound.attachSound("bonus");
var die_Sound = new Sound();
die_Sound.attachSound("die");
var explosion_Sound = new Sound();
explosion_Sound.attachSound("explosion");
var level_Sound = new Sound();
level_Sound.attachSound("level");
var over_Sound = new Sound();
over_Sound.attachSound("over");
var rocket_Sound = new Sound();
rocket_Sound.attachSound("rocket");
var shot_Sound = new Sound();
shot_Sound.attachSound("shot");
Frame 7
overview = "You take a role of a commando. Your task is to defend a military base situated on the island of MyPlayCity.\rThe base is attacked by the air forces of the enemy. The enemy troops are landed periodically.\rYou are to repulse an attack to protect the base. You have weapons of all kinds at your disposal. You receive ammunition and medicines via air support.";
Frame 11
function pausefunction() {
if (!pauseflag) {
pauselabel = "Pause";
} else {
pauselabel = "";
}
pauseflag = !pauseflag;
}
time_wait = 0;
levellabel = "Level " + String(numlevel);
levelpanel = String(numlevel);
killcount = 5 * numlevel;
_root.actions.maxcountman = numlevel + 2;
_root.actions.countman = 0;
_root.actions.maxcountbonus = numlevel + 2;
_root.actions.countbonus = 0;
dead = false;
gameover = false;
_root.healthpanel._width = (health * 60) / 100;
_root.energypanel._width = (energy * 60) / 500;
if (numlevel == 1) {
_root.actions.countweap2 = 0;
_root.actions.countweap3 = 0;
_root.actions.countweap4 = 0;
_root.actions.countweap5 = 0;
_root.actions.countweap6 = 0;
_root.actions.countweap7 = 0;
_root.actions.addweap2 = 20;
_root.actions.addweap3 = 20;
_root.actions.addweap4 = 50;
_root.actions.addweap5 = 20;
_root.actions.addweap6 = 10;
_root.actions.addweap7 = 10;
}
var i = 2;
while (i <= 7) {
if (eval ("_root.actions.countweap" + String(i)) == 0) {
eval ("_root.weap" + String(i))._visible = false;
}
i++;
}
pauselabel = "";
pauseflag = false;
keyflag = false;
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!keyflag) {
keyflag = true;
if (Key.getCode() == 80) {
pausefunction();
}
}
};
keyListener.onKeyUp = function () {
keyflag = false;
};
Key.addListener(keyListener);
Instance of Symbol 172 MovieClip "base" in Frame 11
onClipEvent (load) {
stop();
act = _root.actions;
life = _root.energy;
}
onClipEvent (enterFrame) {
if (!_root.pauseflag) {
if (life != 500) {
gotoAndStop(5 - Math.floor(life / 100));
}
for (var j in _root.shotMonstr) {
if (this.hitTest(_root.shotMonstr[j]._x, _root.shotMonstr[j]._y, true)) {
switch (_root.shotMonstr[j].patron._currentframe) {
case 3 :
life = life - 2;
break;
case 4 :
case 9 :
life = life - 3;
break;
case 5 :
case 7 :
life = life - 5;
break;
case 8 :
life = life - 1;
}
k = act.getNextHighestDepth();
if (life <= 0) {
_root.gameover = true;
} else {
switch (_root.shotMonstr[j].patron._currentframe) {
case 3 :
case 8 :
case 9 :
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMonstr[j]._x, _y:_root.shotMonstr[j]._y, _xscale:15, _yscale:15});
break;
case 4 :
case 5 :
case 7 :
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMonstr[j]._x, _y:_root.shotMonstr[j]._y, _xscale:50, _yscale:50});
}
}
_root.energy = life;
removeMovieClip(_root.shotMonstr[j]);
}
}
}
}
Instance of Symbol 180 MovieClip "lifepanel" in Frame 11
onClipEvent (load) {
stop();
}
Instance of Symbol 191 MovieClip "actions" in Frame 11
onClipEvent (load) {
speedpatron1 = 30;
speedpatron2 = 10;
gravity = 5;
weap1 = 300;
weap2 = 200;
weap3 = 200;
weap4 = 100;
weap5 = 800;
weap6 = 1000;
weap7 = 300;
speedplane1 = 200;
speedplane2 = 1500;
speedplane3 = 1500;
speedplane4 = 400;
speedplane5 = 400;
rotatpatronplane1 = 120;
rotatpatronplane2 = 90;
angleflypatron1 = 45;
angleflypatron2 = 30;
maxspeedplane = 10;
speedparashute = 7;
}
Instance of Symbol 245 MovieClip "player" in Frame 11
onClipEvent (load) {
this.up.stop();
this.hand.stop();
this.hand.shot.stop();
this.down.stop();
land = _root.land;
act = _root.actions;
life = _root.health;
fr = 1;
}
onClipEvent (enterFrame) {
if (!_root.pauseflag) {
scrollflag = true;
var mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if (scrollflag) {
do {
fr = fr + 1;
if (fr > 7) {
fr = 1;
}
} while (!eval ("_root.weap" + String(fr))._visible);
scrollflag = false;
_root.player.hand.gotoAndStop(fr);
if (fr != 1) {
_root.patroncount = eval ("_root.actions.countweap" + String(fr));
} else {
_root.patroncount = "UNLIM.";
}
}
};
Mouse.addListener(mouseListener);
if (_root._ymouse < 340) {
delx = Math.round(_xmouse / 10);
if (delx > 17) {
delx = 17;
}
if (this._x > _root._xmouse) {
_xscale = -100;
if (_xmouse > 10) {
_x = (_x - delx);
}
} else {
_xscale = 100;
if (_xmouse > 10) {
_x = (_x + delx);
}
}
if (_xmouse > 10) {
this.down.play();
} else {
this.down.stop();
}
} else {
this.down.stop();
}
corner = Math.floor(Math.abs(_ymouse) / 100);
switch (corner) {
case 0 :
this.up.gotoAndStop(1);
break;
case 1 :
this.up.gotoAndStop(2);
break;
case 2 :
case 3 :
this.up.gotoAndStop(3);
}
tg = Math.round(((-_ymouse) * 90) / 300);
if (tg > 90) {
tg = 90;
}
if (tg < -10) {
tg = -10;
}
this.hand._rotation = -tg;
if (land.hitTest(_x, _y - 6, true)) {
_y = (_y - 6);
}
if (land.hitTest(_x, _y - 2, true)) {
GravityForce = 0;
} else {
GravityForce = act.gravity;
}
_y = (_y + GravityForce);
for (var j in _root.shotMonstr) {
if (this.hit.hitTest(_root.shotMonstr[j].patron)) {
switch (_root.shotMonstr[j].patron._currentframe) {
case 3 :
life = life - 2;
break;
case 4 :
case 9 :
life = life - 3;
break;
case 5 :
case 7 :
life = life - 5;
break;
case 8 :
life = life - 1;
}
k = act.getNextHighestDepth();
if (life <= 0) {
act.attachMovie("blood", "blood" + String(k), k, {_x:this._x, _y:this._y, _xscale:100, _yscale:100});
_root.dead = true;
} else {
switch (_root.shotMonstr[j].patron._currentframe) {
case 3 :
case 8 :
case 9 :
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMonstr[j]._x, _y:_root.shotMonstr[j]._y, _xscale:15, _yscale:15});
break;
case 4 :
case 5 :
case 7 :
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMonstr[j]._x, _y:_root.shotMonstr[j]._y, _xscale:50, _yscale:50});
}
}
_root.health = life;
removeMovieClip(_root.shotMonstr[j]);
}
}
}
}
Frame 12
if (time_wait > 36) {
gotoAndPlay ("gogogo");
}
time_wait = time_wait + 1;
Frame 13
gotoAndPlay (12);
Frame 14
if ((numlevel % 3) != 0) {
max = numlevel + 1;
if (numlevel > 4) {
max = 5;
}
var i = 0;
while (i < max) {
duplicateMovieClip ("_root.airplane", "plane" + String(i), _root.getNextHighestDepth());
i++;
}
} else {
var i = 0;
while (i < 3) {
duplicateMovieClip ("_root.airplane", "plane" + String(i), _root.getNextHighestDepth());
i++;
}
}
Instance of Symbol 251 MovieClip "shotMy" in Frame 14
onClipEvent (load) {
timefire = getTimer();
flagfire = false;
ppp = _root.player;
}
onClipEvent (mouseDown) {
if (!_root.pauseflag) {
if (_root._ymouse < 340) {
flagfire = true;
}
}
}
onClipEvent (enterFrame) {
if (!_root.pauseflag) {
speedmyshot = eval ("_root.actions.weap" + String(ppp.hand._currentframe));
if (flagfire && ((getTimer() - timefire) > speedmyshot)) {
timefire = getTimer();
if (ppp._xscale > 0) {
rotat = 90 - ppp.tg;
} else {
rotat = -(90 - ppp.tg);
}
var shotPoint = {x:ppp.hand.shot._x, y:ppp.hand.shot._y};
ppp.hand.localToGlobal(shotPoint);
var handPoint = {x:shotPoint.x, y:shotPoint.y};
_root.player.localToGlobal(handPoint);
xPos = shotPoint.x;
yPos = shotPoint.y;
i = this.getNextHighestDepth();
switch (ppp.hand._currentframe) {
case 1 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(1);
_root.shot_Sound.start();
break;
case 2 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(1);
_root.shot_Sound.start();
break;
case 3 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(2);
_root.shot_Sound.start();
break;
case 4 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(1);
_root.shot_Sound.start();
break;
case 5 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(4);
_root.rocket_Sound.start();
break;
case 6 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(5);
i = this.getNextHighestDepth();
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat + 10}).patron.gotoAndStop(5);
i = this.getNextHighestDepth();
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat - 10}).patron.gotoAndStop(5);
_root.rocket_Sound.start();
break;
case 7 :
this.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:yPos, _rotation:rotat}).patron.gotoAndStop(6);
}
_root.shot_Sound.start();
if (ppp.hand._currentframe != 1) {
_root.actions["countweap" + String(ppp.hand._currentframe)] = _root.actions["countweap" + String(ppp.hand._currentframe)] - 1;
_root.patroncount = eval ("_root.actions.countweap" + String(ppp.hand._currentframe));
if (eval ("_root.actions.countweap" + String(ppp.hand._currentframe)) == 0) {
eval ("_root.weap" + String(ppp.hand._currentframe))._visible = false;
_root.patroncount = "UNLIM.";
ppp.hand.gotoAndStop(1);
}
}
}
}
}
onClipEvent (mouseUp) {
flagfire = false;
}
Instance of Symbol 259 MovieClip "airplane" in Frame 14
onClipEvent (load) {
function onloadmonster() {
switch (_root.numlevel) {
case 1 :
frm = Math.round(Math.random() * 6);
if (((frm == 0) || (frm == 2)) || (frm == 4)) {
frm = 1;
}
if (frm == 5) {
frm = 6;
}
break;
case 2 :
do {
frm = Math.round(Math.random() * 6);
if (frm == 0) {
frm = 6;
}
} while (((frm == 3) || (frm == 4)) || (frm == 5));
break;
case 4 :
do {
frm = Math.round(Math.random() * 6);
if (frm == 0) {
frm = 6;
}
} while ((frm == 4) || (frm == 5));
break;
case 5 :
do {
frm = Math.round(Math.random() * 6);
if (frm == 0) {
frm = 6;
}
} while (frm == 5);
break;
default :
if ((_root.numlevel % 3) == 0) {
frm = Math.round(Math.random() * 6);
if ((!(frm === 3)) || (!(frm === 6))) {
frm = 3;
}
if (Math.random() > 0.8) {
frm = 6;
}
} else {
frm = Math.round(Math.random() * 6);
if (frm != 0) {
break;
}
frm = 6;
}
}
switch (frm) {
case 1 :
life = 10;
break;
case 2 :
case 4 :
life = 20;
break;
case 3 :
case 5 :
life = 30;
}
this.gotoAndStop(frm);
if (Math.random() < 0.5) {
this._x = -100 - (Math.random() * 500);
this._xscale = -100;
} else {
this._x = 600 + (Math.random() * 500);
this._xscale = 100;
}
this._y = (Math.random() * 50) + 60;
xSpeed = (Math.random() * _root.actions.maxspeedplane) + 5;
timefire = getTimer();
zona = flase;
}
stop();
if (_name != "airplane") {
act = _root.actions;
onloadmonster();
}
}
onClipEvent (enterFrame) {
if (_name != "airplane") {
if ((_root._currentframe < 14) || (_root._currentframe > 19)) {
removeMovieClip(this);
}
if (!_root.pauseflag) {
if (((!zona) && (_x > 0)) && (_x < 500)) {
zona = true;
}
if (_xscale < 0) {
_x = (_x + xSpeed);
} else {
_x = (_x - xSpeed);
}
if (zona && ((_x < -100) || (_x > 600))) {
onloadmonster();
}
switch (this._currentframe) {
case 1 :
if ((zona && (Math.random() > 0.5)) && ((getTimer() - timefire) > act.speedplane1)) {
timefire = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = -act.rotatpatronplane1;
} else {
rotat = act.rotatpatronplane1;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:this._x, _y:this._y, _rotation:rotat}).patron.gotoAndStop(3);
_root.shot_Sound.start();
}
break;
case 2 :
if ((zona && (Math.random() > 0.8)) && ((getTimer() - timefire) > act.speedplane2)) {
timefire = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = -act.rotatpatronplane2;
} else {
rotat = act.rotatpatronplane2;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:this._x, _y:this._y, _rotation:rotat}).patron.gotoAndStop(7);
_root.rocket_Sound.start();
}
break;
case 3 :
if (((((_x > 50) && (_x < 450)) && (Math.random() > 0.8)) && ((getTimer() - timefire) > act.speedplane3)) && (act.countman < act.maxcountman)) {
act.countman = act.countman + 1;
timefire = getTimer();
i = _root.getNextHighestDepth();
_root.parachute.duplicateMovieClip("parachute" + String(i), i, {_x:this._x, _y:this._y}).gotoAndStop(9);
}
break;
case 4 :
if ((zona && (Math.random() > 0.6)) && ((getTimer() - timefire) > act.speedplane4)) {
timefire = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = -act.rotatpatronplane1;
} else {
rotat = act.rotatpatronplane1;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:this._x, _y:this._y, _rotation:rotat}).patron.gotoAndStop(4);
_root.rocket_Sound.start();
}
break;
case 5 :
if ((zona && (Math.random() > 0.6)) && ((getTimer() - timefire) > act.speedplane5)) {
timefire = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = -act.rotatpatronplane1;
} else {
rotat = act.rotatpatronplane1;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:this._x, _y:this._y, _rotation:rotat}).patron.gotoAndStop(5);
_root.rocket_Sound.start();
}
break;
case 6 :
if (!(((((_x > 50) && (_x < 450)) && (Math.random() > 0.8)) && ((getTimer() - timefire) > act.speedplane3)) && (act.countbonus < act.maxcountbonus))) {
break;
}
act.countbonus = act.countbonus + 1;
do {
num = Math.round(Math.random() * 8);
if (num == 0) {
num = 8;
}
} while (num == 4);
timefire = getTimer();
i = _root.getNextHighestDepth();
_root.parachute.duplicateMovieClip("parachute" + String(i), i, {_x:this._x, _y:this._y}).gotoAndStop(num);
}
if (this._currentframe != 6) {
for (var j in _root.shotMy) {
if (this.hitTest(_root.shotMy[j].patron)) {
switch (_root.shotMy[j].patron._currentframe) {
case 1 :
life = life - 2;
break;
case 2 :
life = life - 4;
break;
case 4 :
life = life - 5;
break;
case 5 :
life = life - 10;
break;
case 6 :
life = life - 10;
}
k = act.getNextHighestDepth();
if (life <= 0) {
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:this._x, _y:this._y, _xscale:70, _yscale:70});
_root.explosion_Sound.start();
_root.killcount = _root.killcount - 5;
onloadmonster();
switch (frm) {
case 1 :
_root.score = _root.score + 10;
break;
case 2 :
case 4 :
_root.score = _root.score + 20;
break;
case 3 :
case 5 :
_root.score = _root.score + 30;
}
} else {
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMy[j]._x, _y:this._y - 5, _xscale:30, _yscale:30});
}
removeMovieClip(_root.shotMy[j]);
}
}
}
}
}
}
Instance of Symbol 277 MovieClip "parachute" in Frame 14
onClipEvent (load) {
stop();
if (_name != "parachute") {
}
}
onClipEvent (enterFrame) {
if (_name != "parachute") {
if ((_root._currentframe < 14) || (_root._currentframe > 19)) {
removeMovieClip(this);
}
if (!_root.pauseflag) {
if (this._currentframe == 9) {
for (var j in _root.shotMy) {
if (this.hitTest(_root.shotMy[j].patron)) {
k = _root.actions.getNextHighestDepth();
_root.actions.attachMovie("blood", "blood" + String(k), k, {_x:this._x, _y:this._y + (this._height / 1.25), _xscale:80, _yscale:80});
k = _root.actions.getNextHighestDepth();
if ((_root.shotMy[j].patron._currentframe == 4) || (_root.shotMy[j].patron._currentframe == 5)) {
_root.actions.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMy[j]._x, _y:_root.shotMy[j]._y, _xscale:70, _yscale:70});
}
_root.killcount = _root.killcount - 1;
_root.actions.countman = _root.actions.countman - 1;
_root.score = _root.score + 1;
removeMovieClip(_root.shotMy[j]);
removeMovieClip(this);
}
}
}
var j = 1;
while (j <= _root.actions.speedparashute) {
if (_root.land.hitTest(this._x, this.getBounds(_root).yMax + j, true)) {
i = _root.getNextHighestDepth();
_root.bonus.duplicateMovieClip("bonus" + String(i), i, {_x:this._x, _y:this.getBounds(_root).yMax + j}).gotoAndStop(this._currentframe);
removeMovieClip(this);
break;
}
j++;
}
_y = (_y + _root.actions.speedparashute);
}
}
}
Instance of Symbol 289 MovieClip "bonus" in Frame 14
onClipEvent (load) {
stop();
if (_name != "bonus") {
ttt = 0;
timer = getTimer();
frm = this._currentframe;
act = _root.actions;
if (frm == 9) {
whichman = Math.round(Math.random()) + 1;
this.man.gotoAndStop(whichman);
}
switch (whichman) {
case 1 :
if (this._x > _root.player._x) {
this._xscale = -100;
}
life = 1;
this.shot.stop();
break;
case 2 :
if (this._x > _root.player._x) {
this._xscale = -100;
}
life = 3;
this.shot.stop();
}
}
}
onClipEvent (enterFrame) {
if (_name != "bonus") {
if ((_root._currentframe < 14) || (_root._currentframe > 19)) {
removeMovieClip(this);
}
if (!_root.pauseflag) {
if ((frm != 9) && ((getTimer() - timer) > 7000)) {
act.countbonus = act.countbonus - 1;
removeMovieClip(this);
}
if (this.hitTest(_root.player.down)) {
switch (this._currentframe) {
case 1 :
act.countweap3 = act.countweap3 + act.addweap3;
_root.weap3._visible = true;
break;
case 2 :
act.countweap4 = act.countweap4 + act.addweap4;
_root.weap4._visible = true;
break;
case 3 :
act.countweap6 = act.countweap6 + act.addweap6;
_root.weap6._visible = true;
break;
case 5 :
act.countweap2 = act.countweap2 + act.addweap2;
_root.weap2._visible = true;
break;
case 8 :
act.countweap5 = act.countweap5 + act.addweap5;
_root.weap5._visible = true;
break;
case 6 :
_root.health = _root.health + 50;
if (_root.health > 100) {
_root.health = 100;
}
break;
case 7 :
_root.score = _root.score + 100;
}
if (this._currentframe != 9) {
_root.bonus_Sound.start();
act.countbonus = act.countbonus - 1;
removeMovieClip(this);
}
}
switch (whichman) {
case 1 :
if ((Math.random() > 0.6) && ((getTimer() - timer) > act.speedplane1)) {
timer = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = 90;
xPos = this._x + this.man.shot._x;
} else {
rotat = -90;
xPos = this._x - this.man.shot._x;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:this._y + this.man.shot._y, _rotation:rotat}).patron.gotoAndStop(8);
_root.shot_Sound.start();
}
break;
case 2 :
if (!((Math.random() > 0.6) && ((getTimer() - timer) > act.speedplane1))) {
break;
}
timer = getTimer();
i = _root.shotMonstr.getNextHighestDepth();
if (this._xscale > 0) {
rotat = 90;
xPos = this._x + this.man.shot._x;
} else {
rotat = -90;
xPos = this._x - this.man.shot._x;
}
_root.shotMonstr.attachMovie("shotfly", "shotfly" + String(i), i, {_x:xPos, _y:this._y + this.man.shot._y, _rotation:rotat}).patron.gotoAndStop(9);
_root.shot_Sound.start();
}
if (frm == 9) {
for (var j in _root.shotMy) {
if (this.hitTest(_root.shotMy[j].patron)) {
switch (_root.shotMy[j].patron._currentframe) {
case 1 :
life = life - 2;
break;
case 2 :
life = life - 4;
break;
case 4 :
life = life - 5;
break;
case 5 :
life = life - 10;
break;
case 6 :
life = life - 10;
}
k = act.getNextHighestDepth();
if (life <= 0) {
act.attachMovie("blood", "blood" + String(k), k, {_x:this._x, _y:this._y - (this._height / 2), _xscale:100, _yscale:100});
k = act.getNextHighestDepth();
if ((_root.shotMy[j].patron._currentframe == 4) || (_root.shotMy[j].patron._currentframe == 5)) {
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_root.shotMy[j]._x, _y:_root.shotMy[j]._y, _xscale:70, _yscale:70});
}
_root.explosion_Sound.start();
_root.killcount = _root.killcount - 1;
_root.actions.countman = _root.actions.countman - 1;
switch (whichman) {
case 1 :
_root.score = _root.score + 1;
break;
case 2 :
_root.score = _root.score + 3;
}
removeMovieClip(_root.shotMy[j]);
removeMovieClip(this);
} else {
act.attachMovie("vzriv", "vzriv" + String(k), k, {_x:this._x, _y:_root.shotMy[j]._y, _xscale:15, _yscale:15});
}
removeMovieClip(_root.shotMy[j]);
}
}
}
} else {
ttt = getTimer();
}
}
}
Frame 15
scorepanel = String(score);
livespanel = String(lives);
_root.healthpanel._width = (health * 60) / 100;
_root.energypanel._width = (energy * 60) / 500;
if (killcount <= 0) {
numlevel = numlevel + 1;
_root.level_Sound.start();
gotoAndPlay ("wait_level");
}
if (dead) {
dead = false;
_root.lifepanel.nextFrame();
if (_root.lifepanel._currentframe == 4) {
_root.over_Sound.start();
gotoAndPlay ("game_over");
} else {
_root.die_Sound.start();
gotoAndPlay ("dead");
}
}
if (gameover) {
gameover = false;
_root.over_Sound.start();
gotoAndPlay ("game_over");
}
if (Key.isDown(27)) {
gameover = true;
}
Frame 16
gotoAndPlay (15);
Frame 17
time_wait = 0;
Frame 18
if (time_wait > 36) {
health = 100;
_root.healthpanel._width = (health * 60) / 100;
gotoAndPlay ("gogogo");
}
time_wait = time_wait + 1;
Frame 19
gotoAndPlay (18);
Frame 20
time_wait = 0;
Frame 21
if (time_wait > 36) {
gotoAndPlay ("wait_level");
}
time_wait = time_wait + 1;
Frame 22
gotoAndPlay (21);
Frame 23
time_wait = 0;
Frame 24
if (time_wait > 36) {
gotoAndStop ("download");
}
time_wait = time_wait + 1;
Frame 25
gotoAndPlay (24);
Frame 26
namecreater = "MyPlayCity.com";
_root.name_txt.text = namecreater;
LoadVars.prototype.clear = function () {
for (element in this) {
if (typeof(this[element]) != "function") {
delete this[element];
}
}
};
setStatus = function (statusText) {
_root.status_txt.text = statusText;
};
getStatus = function () {
return(status_txt.text);
};
setFocusHandler = function () {
setStatus(this.statusText);
this.backgroundColor = 16777215 /* 0xFFFFFF */;
};
killFocusHandler = function () {
setStatus("");
this.backgroundColor = 13291221 /* 0xCACED5 */;
};
changedHandler = function () {
var _local2 = true;
var _local3 = false;
_local3 = true;
if (((_root.name_txt.length == 0) || (_root.email_txt.length == 0)) || (((_root.email1_txt.length == 0) && (_root.email2_txt.length == 0)) && (_root.email3_txt.length == 0))) {
_local2 = false;
}
if (_local2) {
submitBtn.enable();
} else {
submitBtn.disable();
}
if (_local3) {
resetBtn.enable();
} else {
resetBtn.disable();
}
};
enableForm = function () {
var _local2 = 0;
while (_local2 < textFields.length) {
_root[textFields[_local2]].selectable = true;
_root[textFields[_local2]].border = true;
_local2++;
}
submitBtn.enable();
resetBtn.enable();
cancelBtn.enable();
};
disableForm = function () {
var _local2 = 0;
while (_local2 < textFields.length) {
_root[textFields[_local2]].selectable = false;
_root[textFields[_local2]].border = false;
_local2++;
}
submitBtn.disable();
resetBtn.disable();
cancelBtn.disable();
};
resetForm = function () {
setStatus("");
_global.oldStatusText = "";
var _local3 = 0;
while (_local3 < textFields.length) {
_root[textFields[_local3]].selectable = true;
_root[textFields[_local3]].border = true;
if (_root[textFields[_local3]]._name != "subject_txt") {
_root[textFields[_local3]].text = "";
}
if (_root[textFields[_local3]]._name == "name_txt") {
_root[textFields[_local3]].text = namecreater;
}
_local3++;
}
resetBtn.disable();
submitBtn.disable();
};
submitForm = function () {
disableForm();
dataHandler.clear();
var _local2 = 0;
while (_local2 < textFields.length) {
if (_local2 != (textFields.length - 1)) {
dataHandler[textFields[_local2]] = _root[textFields[_local2]].text;
} else {
var _local3 = new String(_root._url);
dataHandler[textFields[_local2]] = _local3.substr(0, _local3.length - 4) + ".html";
}
_local2++;
}
dataHandler.sendAndLoad("mailer.php", dataHandler, "POST");
setStatus("Contacting server...please wait!");
};
cancelForm = function () {
gotoAndStop ("begin");
};
messageBox = function (message) {
setStatus("");
_global.oldStatusText = "";
var _local7 = 200;
var _local4 = _root.createEmptyMovieClip("msgBox_mc", 0);
_local4.createTextField("body_txt", 1, 5, 5, _local7 - 10, 10);
_local4.body_txt.multiline = true;
_local4.body_txt.autoSize = true;
_local4.body_txt.wordWrap = true;
_local4.body_txt.selectable = false;
_local4.body_txt.textColor = 6776679 /* 0x676767 */;
_local4.body_txt.text = message;
var _local8 = new TextFormat();
_local8.align = "center";
_local8.font = "_sans";
_local8.size = 12;
_local4.body_txt.setTextFormat(_local8);
var _local6 = _local4.body_txt.textHeight + 10;
var _local5 = _local4.attachMovie("FSimpleButton", "closeBtn", 0);
_local5._x = (_local7 - _local5._width) / 2;
_local5._y = _local6;
_local5.captionText = "Ok";
_local5.showHand = false;
_local5.captionColor = 6776681 /* 0x676769 */;
_local5.init();
_local5.onRelease = function () {
enableForm();
this._parent.removeMovieClip();
};
_local6 = _local6 + (_local5._height + 5);
_local4._x = (Stage.width - _local7) / 2;
_local4._y = (Stage.height - _local6) / 2;
_local4.moveTo(0, _local6);
_local4.lineStyle(1, 16119544, 100);
_local4.beginFill(15461616, 100);
_local4.lineTo(0, 0);
_local4.lineTo(_local7, 0);
_local4.lineStyle(1, 12763844, 100);
_local4.lineTo(_local7, _local6);
_local4.lineTo(0, _local6);
_local4.endFill();
};
dataHandler = new LoadVars();
dataHandler.onLoad = function (success) {
messageBox("Thank you!");
};
textFields = ["name_txt", "email_txt", "subject_txt", "email1_txt", "email2_txt", "email3_txt", "link_txt"];
statusStrings = ["Enter your name here", "You should enter your email address here", "This is the subject of your email", "You should enter friend's email address here", "You should enter friend's email address here", "You should enter friend's email address here"];
count = 0;
while (count < (textFields.length - 1)) {
textField_txt = this[textFields[count]];
textField_txt.border = true;
textField_txt.borderColor = 11645361 /* 0xB1B1B1 */;
textField_txt.background = true;
textField_txt.backgroundColor = 13291221 /* 0xCACED5 */;
textField_txt.onSetFocus = setFocusHandler;
textField_txt.onKillFocus = killFocusHandler;
textField_txt.onChanged = changedHandler;
textField_txt.statusText = statusStrings[count];
count++;
}
changedHandler();
stop();
Instance of Symbol 35 MovieClip [FSimpleButton] "submitBtn" in Frame 26
//component parameters
onClipEvent (construct) {
captionText = "Submit";
captionColor = 6776681 /* 0x676769 */;
captionDisabledColor = 11645361 /* 0xB1B1B1 */;
clickHandler = "submitForm";
showHand = false;
statusText = "Submit form details to server";
statusVar = "statusText";
}
Instance of Symbol 35 MovieClip [FSimpleButton] "resetBtn" in Frame 26
//component parameters
onClipEvent (construct) {
captionText = "Reset";
captionColor = 6776681 /* 0x676769 */;
captionDisabledColor = 11645361 /* 0xB1B1B1 */;
clickHandler = "resetForm";
showHand = false;
statusText = "Clear the form fields";
statusVar = "statusText";
}
Instance of Symbol 35 MovieClip [FSimpleButton] "cancelBtn" in Frame 26
//component parameters
onClipEvent (construct) {
captionText = "Cancel";
captionColor = 6776681 /* 0x676769 */;
captionDisabledColor = 11645361 /* 0xB1B1B1 */;
clickHandler = "cancelForm";
showHand = false;
statusText = "Return to Menu";
statusVar = "statusText";
}
Instance of Symbol 20 MovieClip "patron" in Symbol 21 MovieClip [shotfly] Frame 1
onClipEvent (load) {
stop();
if (this._currentframe != 7) {
speed = _root.actions.speedpatron1;
angle = _root.actions.angleflypatron1;
} else {
speed = _root.actions.speedpatron2;
angle = _root.actions.angleflypatron2;
}
if (_parent._rotation < 0) {
angle = -angle;
}
if (this._currentframe > 7) {
angle = _parent._rotation;
}
if (_parent._parent._name == "shotMonstr") {
if (_parent._rotation > 0) {
xSpeed = speed * Math.sin((angle / 180) * Math.PI);
ySpeed = speed * Math.cos((angle / 180) * Math.PI);
} else {
xSpeed = speed * Math.sin((angle / 180) * Math.PI);
ySpeed = speed * Math.cos((angle / 180) * Math.PI);
}
}
if (_parent._parent._name == "shotMy") {
ppp = _root.player;
if (_parent._rotation > 0) {
xSpeed = speed * Math.sin((_parent._rotation / 180) * Math.PI);
ySpeed = (-speed) * Math.cos((_parent._rotation / 180) * Math.PI);
} else {
xSpeed = speed * Math.sin((_parent._rotation / 180) * Math.PI);
ySpeed = (-speed) * Math.cos((_parent._rotation / 180) * Math.PI);
}
}
}
onClipEvent (enterFrame) {
if (!_root.pauseflag) {
with (_parent) {
_x = _x + xSpeed;
_y = _y + ySpeed;
if ((((_x > 500) || (_x < 0)) || (_y > 375)) || (_y < 0)) {
removeMovieClip(this);
}
if (_root.land.hitTest(_x, _y, true)) {
switch (this._currentframe) {
case 4 :
case 5 :
case 6 :
case 7 :
k = _root.shotMy.getNextHighestDepth();
_root.shotMy.attachMovie("vzriv", "vzriv" + String(k), k, {_x:_x, _y:_y, _xscale:60, _yscale:60});
}
removeMovieClip(this);
}
}
}
}
Symbol 25 MovieClip [vzriv] Frame 9
removeMovieClip(this);
Symbol 28 MovieClip [blood] Frame 5
removeMovieClip(this);
Symbol 35 MovieClip [FSimpleButton] Frame 1
#initclip 1
FSimpleButton = function () {
this.init();
};
FSimpleButton.prototype = new MovieClip();
FSimpleButton.prototype.init = function () {
this.caption_txt.text = this.captionText;
this.caption_txt.textColor = this.captionColor;
this.useHandCursor = this.showHand;
this.tabEnabled = false;
this.onRollOut = this.myRollOut;
this.onRollOver = this.myRollOver;
this.onPress = this.myPress;
this.onRelease = this.myRelease;
this.onDragOut = this.myDragOut;
this.onDragOver = this.myDragOver;
this.onReleaseOutside = this.myReleaseOutside;
};
FSimpleButton.prototype.myRollOut = function () {
this._parent[this.statusVar] = _global.oldStatusText;
};
FSimpleButton.prototype.myRollOver = function () {
_global.oldStatusText = this._parent[this.statusVar];
this._parent[this.statusVar] = this.statusText;
};
FSimpleButton.prototype.myPress = function () {
};
FSimpleButton.prototype.myRelease = function () {
this._parent[this.clickHandler](this);
};
FSimpleButton.prototype.myDragOut = function () {
this.gotoAndStop("_up");
};
FSimpleButton.prototype.myDragOver = function () {
};
FSimpleButton.prototype.myReleaseOutside = function () {
};
FSimpleButton.prototype.disable = function () {
this.caption_txt.textColor = this.captionDisabledColor;
this.gotoAndStop("disabled");
this.enabled = false;
};
FSimpleButton.prototype.enable = function () {
this.enabled = true;
this.gotoAndStop("_up");
this.caption_txt.textColor = this.captionColor;
};
FSimpleButton.prototype.isEnabled = function () {
return(this.enabled);
};
Object.registerClass("FSimpleButton", FSimpleButton);
#endinitclip
stop();
Symbol 39 Button
on (press) {
getURL ("http://www.myplaycity.com", "_blank");
}
Symbol 53 MovieClip Frame 50
stop();
Symbol 58 Button
on (press) {
getURL ("http://myplaycity.com/air_invasion", "_blank");
}
Symbol 61 Button
on (press) {
getURL ("http://www.myplaycity.com/online_games", "_blank");
}
Symbol 63 Button
on (press) {
getURL ("http://www.myplaycity.com/free_content", "_blank");
}
Symbol 69 Button
on (release) {
_root.beep_Sound.start();
_root.gotoAndPlay("wait_level");
}
on (rollOver) {
_root.beep_Sound.start();
}
Symbol 74 Button
on (release) {
_root.beep_Sound.start();
_root.nextFrame();
}
on (rollOver) {
_root.beep_Sound.start();
}
Symbol 81 Button
on (press) {
getURL ("http://www.freegamesway.com/subscribe", "_blank");
}
Symbol 86 Button
on (press) {
getURL ("http://www.freegamesway.com/custom_games/online", "_blank");
}
Symbol 91 Button
on (press) {
gotoAndStop ("download");
}
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 100 Button
on (release) {
if (_root._currentframe > 7) {
_root.prevFrame();
}
_root.beep_Sound.start();
}
on (rollOver) {
_root.beep_Sound.start();
}
Symbol 104 Button
on (release) {
if (_root._currentframe < 10) {
_root.nextFrame();
}
_root.beep_Sound.start();
}
on (rollOver) {
_root.beep_Sound.start();
}
Symbol 107 Button
on (release) {
_root.beep_Sound.start();
_root.gotoAndStop("begin");
}
on (rollOver) {
_root.beep_Sound.start();
}
Symbol 110 Button
on (release) {
overview.scroll++;
}
Symbol 111 Button
on (release) {
overview.scroll--;
}
Symbol 194 Button
on (release) {
_root.player.hand.gotoAndStop(1);
_root.patroncount = "UNLIM.";
}
Symbol 197 Button
on (release) {
_root.player.hand.gotoAndStop(2);
_root.patroncount = String(_root.actions.countweap2);
}
Symbol 200 Button
on (release) {
_root.player.hand.gotoAndStop(3);
_root.patroncount = String(_root.actions.countweap3);
}
Symbol 203 Button
on (release) {
_root.player.hand.gotoAndStop(4);
_root.patroncount = String(_root.actions.countweap4);
}
Symbol 206 Button
on (release) {
_root.player.hand.gotoAndStop(5);
_root.patroncount = String(_root.actions.countweap5);
}
Symbol 209 Button
on (release) {
_root.player.hand.gotoAndStop(6);
_root.patroncount = String(_root.actions.countweap6);
}
Symbol 212 Button
on (release) {
_root.player.hand.gotoAndStop(7);
_root.patroncount = String(_root.actions.countweap7);
}