Frame 1
function RandomMovement(mc, speed) {
mc.speed = speed;
mc._width = 24;
mc._height = 24;
mc.counter = 0;
mc.xpos = random(650) + 1;
mc.ypos = random(500) + 1;
mc.filters = [gfps];
mc.onEnterFrame = function () {
this._x = this._x + ((this.xpos - this._x) / mc.speed);
this._y = this._y + ((this.ypos - this._y) / mc.speed);
if (Math.abs((this.ypos - this._y) / this.speed) < 1) {
this.counter++;
this.xpos = random(650) + 1;
this.ypos = random(500) + 1;
}
};
}
function MoveObjects() {
i = 0;
while (i < 52) {
_root["pula" + i]._x;
if ("pula" + i) {
_root["pula" + i]._x = _root["pula" + i]._x + _root["pula" + i].xmov;
_root["pula" + i]._y = _root["pula" + i]._y + _root["pula" + i].ymov;
}
i++;
}
}
function vistrel() {
if (_root.nomer_puli > 50) {
_root.nomer_puli = 0;
} else {
_root.nomer_puli++;
}
angle = ship._rotation;
angle = (angle * 3.141593) / 180;
pdepth = pdepth + 2;
pula = "pula" + nomer_puli;
_root.attachMovie("pula", pula, nomer_puli + glubina_puli);
_root[pula]._x = _root.ship._x + (nose * Math.cos(angle));
_root[pula]._y = _root.ship._y + (nose * Math.sin(angle));
_root[pula].xmov = pspeed * Math.cos(angle);
_root[pula].ymov = pspeed * Math.sin(angle);
_root[pula]._rotation = (angle * 180) / 3.141593;
}
function Collide(item_smoker, item_ball) {
calc12312 = CALC_Dist_Xv_Yv(item_smoker._x, item_smoker._y, item_ball._x, item_ball._y);
distance = calc12312[0];
item_ball_diametr = item_ball._width;
if (distance < item_ball_diametr) {
return(true);
}
return(false);
}
xspeed = 150;
yspeed = 150;
nomer_puli = 0;
nose = 2;
pspeed = 10;
glubina_puli = 800;
body_depth = 100;
body_number = 0;
nausence_depth = 300;
ship.swapDepths(1000);
Mouse.hide();
SpawnNausence();
if (_root.nausence_number > 50) {
_root.nausence_number = 0;
} else {
_root.nausence_number++;
}
nausence = "nausence" + nausence_number;
_root.attachMovie("nausence", nausence, nausence_depth + nausence_number);
onMouseDown = function () {
vistrel();
};
onEnterFrame = function () {
MoveObjects();
SpawnNausence();
};
ship.onEnterFrame = function () {
xpos = cursor._x - 10;
ypos = cursor._y - 10;
xdiff = _root._xmouse - this._x;
ydiff = _root._ymouse - this._y;
angle = Math.atan2(ydiff, xdiff);
angle = (angle * 180) / 3.141593;
this._rotation = angle;
xproc = (xpos - ship._x) / xspeed;
yproc = (ypos - ship._y) / yspeed;
xmult = xproc;
ymult = yproc;
if (Key.isDown(87)) {
yspeed = 30;
}
if (Math.abs((this.ypos - this._y) / this.speed) < 5) {
xmult = 0;
ymult = 0;
}
};
Instance of Symbol 41 MovieClip "ship" in Frame 1
onClipEvent (load) {
function Collide(item_smoker, item_ball) {
calc12312 = CALC_Dist_Xv_Yv(item_smoker._x, item_smoker._y, item_ball._x, item_ball._y);
distance = calc12312[0];
item_ball_diametr = item_ball._width;
if (distance < item_ball_diametr) {
return(true);
}
return(false);
}
function CALC_Dist_Xv_Yv(x1, y1, x2, y2) {
A = {};
B = {};
A.xx = x1;
A.yy = y1;
B.xx = x2;
B.yy = y2;
dx = A.xx - B.xx;
dy = A.yy - B.yy;
distance = Math.sqrt((dx * dx) + (dy * dy));
return(distance);
}
power = 0.3;
yspeed = 0;
xspeed = 0;
friction = 0.95;
}
onClipEvent (enterFrame) {
_root.xspeed = this.xspeed;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
if (_root.bound.hitTest(this)) {
trace("imhit");
_root.ship.xmult = -_root.ship.xmult;
_root.ship.xmult = -_root.ship.xmult;
this._x = this._x;
this._y = this._y;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (Key.isDown(65)) {
xspeed = xspeed - power;
}
if (Key.isDown(68)) {
xspeed = xspeed + power;
}
if (Key.isDown(87)) {
yspeed = yspeed - power;
}
if (Key.isDown(83)) {
yspeed = yspeed + power;
}
if (Key.isDown(8)) {
hit = 1;
}
}
Instance of Symbol 43 MovieClip "cursor" in Frame 1
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
this.swapDepths(_root.getNextHighestDepth());
}
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Instance of Symbol 32 MovieClip [nausence] in Frame 1
/* no clip actions */
Symbol 10 MovieClip [explosion] Frame 4
stop();
removeMovieClip("");
Symbol 13 MovieClip [chpok] Frame 6
removeMovieClip("");
Symbol 15 MovieClip [2exp] Frame 15
removeMovieClip(this);
Symbol 18 MovieClip [body] Frame 1
stop();
corpses_persist = false;
if (!corpses_persist) {
play();
}
Symbol 18 MovieClip [body] Frame 177
stop();
removeMovieClip("");
Symbol 21 MovieClip [smoke] Frame 12
stop();
Symbol 24 MovieClip [bonus] Frame 1
stop();
onEnterFrame = function () {
dx = _root.ship._x - _x;
dy = _root.ship._y - _y;
distance = Math.sqrt((dx * dx) + (dy * dy));
if (distance < 40) {
gotoAndPlay (2);
}
};
Symbol 24 MovieClip [bonus] Frame 2
onEnterFrame = function () {
};
Symbol 24 MovieClip [bonus] Frame 7
stop();
removeMovieClip("");
Symbol 32 MovieClip [nausence] Frame 1
cadr = 1;
stop();
this.onEnterFrame = function () {
_alpha = 100;
xdiff = _root.ship._x - this._x;
ydiff = _root.ship._y - this._y;
angle = Math.atan2(ydiff, xdiff);
angle = (angle * 180) / 3.141593;
this._rotation = angle;
dist_x = _root.ship._x - _x;
dist_y = _root.ship._y - _y;
angle = Math.atan2(dist_y, dist_x);
xspeed = Math.cos(angle) * 1;
yspeed = Math.sin(angle) * 1;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
i = 0;
while (i < 52) {
pula = "pula" + i;
if (this.hitTest(_root[pula])) {
if (cadr < 5) {
chpokname = "chpok" + _root.getNextHighestDepth();
_root.attachMovie("chpok", chpokname, _root.getNextHighestDepth());
_root[chpokname]._x = this._x;
_root[chpokname]._y = this._y;
}
removeMovieClip(_root[pula]);
gotoAndStop(cadr);
cadr++;
dist_x = _root[pula]._x - _x;
dist_y = _root[pula]._y - _y;
angle = Math.atan2(dist_y, dist_x);
}
if (this.hitTest(_root.ball)) {
trace("hit");
_root.ball._x = _root.ball._x + 60;
_root.ball._y = _root.ball._y + 60;
chpokname = "explosion" + _root.getNextHighestDepth();
_root.attachMovie("explosion", chpokname, _root.getNextHighestDepth());
_root[chpokname]._x = _root[pula]._x;
_root[chpokname]._y = _root[pula]._y;
removeMovieClip(_root[pula]);
gotoAndStop(cadr);
cadr++;
}
i++;
}
};
Symbol 32 MovieClip [nausence] Frame 5
play();
this.onEnterFrame = function () {
};
play();
Symbol 32 MovieClip [nausence] Frame 6
play();
Symbol 32 MovieClip [nausence] Frame 10
_root.attachMovie("2exp", "2exp", _root.getNextHighestDepth(), {_x:this._x - 55, _y:this._y - 55});
Symbol 32 MovieClip [nausence] Frame 11
if (_root.body_number == 100) {
_root.body_number = 0;
} else {
_root.body_number++;
}
_root.attachMovie("body", "body" + _root.body_number, _root.body_depth++, {_x:this._x, _y:this._y, _rotation:random(360)});
_root.attachMovie("smoke", "smoke1", _root.getNextHighestDepth(), {_x:this._x, _y:this._y, _rotation:random(360)});
sir = random(5) + 1;
if (sir == 3) {
_root.attachMovie("bonus", "bonus1", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
removeMovieClip(this);
stop();
Symbol 40 MovieClip Frame 1
Symbol 40 MovieClip Frame 6
this.onEnterFrame = function () {
if (Key.isDown()) {
play();
} else {
stop();
}
};