Frame 1
_root.score = 0;
stop();
Frame 2
_root.sec = 30;
stop();
Movieclip.prototype.distanceTo = function (x, y) {
var distx = (x - this._x);
var disty = (y - this._y);
var distance = Math.sqrt((distx * distx) + (disty * disty));
return(distance);
};
Instance of Symbol 44 MovieClip "viseur" in Frame 2
onClipEvent (load) {
this.swapDepths(250);
this.startDrag(true);
Mouse.hide(true);
}
Instance of Symbol 57 MovieClip "poule" in Frame 2
onClipEvent (load) {
this.pos = 1;
this.live = 1;
atester = 0;
}
onClipEvent (enterFrame) {
Volonte = random(4);
if (this.live == "1") {
if (this.pos == "1") {
if (this.volonte == "3") {
this.gotoAndPlay(2);
} else {
this.gotoAndStop(1);
}
}
}
if (this.live == "1") {
this.distance = Math.round(this.distanceTo(_root.cblase, _root.yblase));
if (this.distance < 15) {
this.gotoAndPlay(11);
this.removeMovieClip;
_root.yblase = 0;
_root.cblase = 0;
}
}
}
Instance of Symbol 61 MovieClip in Frame 2
onClipEvent (load) {
_root.jouer = false;
_root.j = 215;
_root.score = Number(0);
_root.nbpoule = 10;
i = 0;
while (i < _root.nbpoule) {
duplicateMovieClip ("_root.poule", "poule" + i, i + 100);
posX = random(200) + 190;
posY = random(20);
_root["poule" + i]._x = posX;
_root["poule" + i]._y = posy + 120;
_root["poule" + i]._xscale = 35 + posy;
_root["poule" + i]._yscale = 35 + posy;
i++;
}
}
Instance of Symbol 70 MovieClip "canon" in Frame 2
onClipEvent (load) {
MIS1 = new Sound();
MIS1.attachSound("missile");
_root.bc = 0;
_root.fired = "0";
}
onClipEvent (enterFrame) {
angle = ((Math.atan2(_root._ymouse - _y, _root._xmouse - _x) * 180) / Math.PI) + 90;
_rotation = angle;
if (speed < 0) {
speed++;
}
if (md) {
if (speed < 45) {
speed = speed + 1;
_root.viseur.gotoAndStop(speed);
}
} else if (speed > 0) {
var n = ("blase" + _root.bc);
speed = speed + 5;
speed = speed / 1.5;
_root.nbbullet = _root.nbbullet + 1;
_root.attachMovie("bullet", n, _root.bc);
_root[n].vx = Math.sin(angle * (Math.PI/180)) * speed;
_root[n].vy = (-Math.cos(angle * (Math.PI/180))) * speed;
_root[n]._x = _x;
_root[n]._y = _y;
_root[n]._rotation = angle;
this.swapDepths(_root[1]);
speed = -15;
_root.bc++;
}
this._x = _root.char._x;
this._y = _root.char._y - 2;
}
onClipEvent (mouseDown) {
md = true;
}
onClipEvent (mouseUp) {
_root.viseur.gotoAndStop(1);
MIS1.start();
md = false;
}
Instance of Symbol 72 MovieClip "char" in Frame 2
onClipEvent (load) {
this.AttachMovieclip;
}
onClipEvent (enterFrame) {
_root.speed = speedship;
_root.mph = Number(speedship) * 2;
_root.mph = _root.mph - (_root.mph % 1);
if (_root.mph < 1) {
_root.mph = 1;
_root.char.car.gotoAndStop(1);
}
if (Math.abs(speed) > 20) {
speedship = speedship * 0.7;
}
if (Key.isDown(37)) {
speedship = speedship + 1.2;
_root.char.car.gotoAndStop(3);
}
if (Key.isDown(39)) {
speedship = speedship - 1.2;
_root.char.car.gotoAndStop(2);
}
speedship = speedship * 0.9;
x = Math.sin(_rotation * (Math.PI/180)) * speedship;
y = (Math.cos(_rotation * (Math.PI/180)) * speedship) * -1;
if (!_root.boundary.hitTest(_x + x, _y + y, true)) {
_x = (_x + x);
_y = (_y + y);
} else {
speedship = speedship * -0.8;
}
}
Frame 3
Mouse.show(true);
loadMovieNum ("http://www.my-a.org/divers/score.swf", 1, "GET");
Set(undefined, undefined);
stop();
Symbol 11 MovieClip [bullet] Frame 1
vx = vx * 0.98;
vy = vy + 0.7;
rad_rot = Math.atan2(vy, vx);
_rotation = ((rad_rot / (Math.PI/180)) + 90);
_x = (_x + vx);
_y = (_y + vy);
_root.cblase = _x;
_root.yblase = _y;
Symbol 11 MovieClip [bullet] Frame 2
if (_root.boundary.hitTest(_x + x, _y + y, true)) {
this.play(3);
} else {
gotoAndPlay (1);
}
Symbol 11 MovieClip [bullet] Frame 10
removeMovieClip(this);
Symbol 11 MovieClip [bullet] Frame 90
removeMovieClip(this);
destructed = eval (this._name);
Symbol 30 Button
on (release) {
play();
}
Symbol 36 Button
on (release) {
loadMovieNum ("http://www.my-a.org/divers/top.swf", 0, "GET");
Set(undefined, undefined);
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 1
nom = this._name;
pos = 1;
stop();
Symbol 57 MovieClip Frame 2
Symbol 57 MovieClip Frame 3
pos = 2;
Symbol 57 MovieClip Frame 8
chgtpos = random(4);
if (chgtpos == "1") {
gotoAndPlay (3);
} else if (chgtpos == "2") {
gotoAndStop (1);
} else if (chgtpos == "3") {
direction = random(3);
this.gotoAndPlay(1);
if (direction == "1") {
this._x = this._x - 8;
this.gotoAndPlay(1);
} else if (direction == "2") {
this._x = this._x + 8;
cscale = this._xscale;
str = (cscale - cscale) - cscale;
this._xscale = str;
this.gotoAndPlay(1);
}
}
Symbol 57 MovieClip Frame 9
gotoAndPlay (1);
Symbol 57 MovieClip Frame 11
todelete = this._name;
this.play();
_root.score = _root.score + 10;
live = 0;
Symbol 57 MovieClip Frame 16
_root.j = _root.j + 1;
duplicateMovieClip ("_root.poule", "poule" + _root.j, _root.j);
x = random(180) + 200;
posY = random(20);
_root["poule" + _root.j]._x = x;
_root["poule" + _root.j]._y = posy + 120;
_root["poule" + _root.j]._xscale = 30 + posy;
_root["poule" + _root.j]._yscale = 30 + posy;
Symbol 57 MovieClip Frame 104
stop();
todelete = this._name;
removeMovieClip(_root[todelete]);
Symbol 70 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 35
_root.sec = _root.sec - 1;
if (_root.sec < 1) {
_root.play();
}