Frame 1
fscommand ("showmenu", "false");
fscommand ("allowscale", "false");
Frame 3
tot = _root.getBytesTotal();
lu = _root.getBytesLoaded();
pc = Math.round((lu / tot) * 100);
loading._xscale = 100 - pc;
if (lu < tot) {
gotoAndPlay (2);
}
Frame 5
stop();
Frame 6
function creerLevel() {
boulle.xxx = 99999 /* 0x01869F */;
boulle.yyy = 99999 /* 0x01869F */;
power.xxx = 99999 /* 0x01869F */;
power.yyy = 99999 /* 0x01869F */;
xmoi = 0;
ymoi = 0;
anglemoi = 0;
nbboulles = 8 + (2 * niveau);
nbMunitions = nbMunitions + nbboulles;
nbpower = 4 + niveau;
_root.plus10._visible = 0;
i = 1;
while (i <= nbpower) {
power.duplicateMovieClip("p" add i, 100 + i);
eval ("p" add i).prof = 100 + i;
eval ("p" add i).xxx = 400 + random(700);
eval ("p" add i).yyy = random(700) - 350;
i++;
}
i = 1;
while (i <= nbboulles) {
boulle.duplicateMovieClip("b" add i, 200 + i);
eval ("b" add i).prof = 200 + i;
eval ("b" add i).xxx = 400 + random(700);
eval ("b" add i).yyy = random(700) - 350;
eval ("_root.b" add i).gotoAndStop(random(32) + 1);
eval ("b" add i).pasx = (random(80) / 10) - 4;
eval ("b" add i).pasy = (random(80) / 10) - 4;
myColor = new Color(eval ("_root.b" add i));
myColorTransform = new Object();
myColorTransform.ra = random(30) + 70;
myColorTransform.ga = random(30) + 40;
myColorTransform.ba = random(20) + 10;
myColorTransform.aa = 100;
myColorTransform.ab = 50;
myColor.setTransform(myColorTransform);
i++;
}
}
function viderLevel() {
i = 1;
while (i <= (4 + niveau)) {
removeMovieClip("p" add i);
i++;
}
i = 1;
while (i <= (8 + (2 * niveau))) {
removeMovieClip("b" add i);
i++;
}
}
function bouge(clip) {
mvt = random(16);
if ((mvt == 1) and (clip.pasx > -3)) {
clip.pasx = clip.pasx - 0.4;
} else if ((mvt == 2) and (clip.pasx < 3)) {
clip.pasx = clip.pasx + 0.4;
} else if ((mvt == 3) and (clip.pasy > -3)) {
clip.pasy = clip.pasy - 0.4;
} else if ((mvt == 4) and (clip.pasy < 3)) {
clip.pasy = clip.pasy + 0.4;
} else if (mvt == 5) {
clip.pasx = Math.round((clip.pasx * 4) / 5);
} else if (mvt == 6) {
clip.pasy = Math.round((clip.pasy * 4) / 5);
}
depx = clip.pasx;
depy = clip.pasy;
eval (clip).xxx = eval (clip).xxx + depx;
eval (clip).yyy = eval (clip).yyy + depY;
}
stopAllSounds();
sonbanjo = new Sound(this);
sonbanjo.attachSound("sonfond");
sonPower = new Sound(this);
sonPower.attachSound("sonPower");
sonGrrr3 = new Sound(this);
sonGrrr3.attachSound("Grrr3");
sonBoum = new Sound(this);
sonBoum.attachSound("sonBoum");
laser2 = new Sound(this);
laser2.attachSound("laser2");
score = 0;
niveau = 1;
nbVies = 3;
unEcouteur = new Object();
unEcouteur.onMouseDown = function () {
if (nbMunitions >= 1) {
laser2.start();
nbMunitions--;
}
};
Mouse.addListener(unEcouteur);
avantcommencer.duplicateMovieClip("av", 51000);
adresse.duplicateMovieClip("ad", 51001);
Mouse.hide();
_root.viseur2.duplicateMovieClip("v2", 51003);
v2.startDrag(true);
_root.av.removeMovieClip();
_root.ad.removeMovieClip();
sonbanjo.start(0, 9999);
boulle.xxx = 99999 /* 0x01869F */;
boulle.yyy = 99999 /* 0x01869F */;
power.xxx = 99999 /* 0x01869F */;
power.yyy = 99999 /* 0x01869F */;
Instance of Symbol 38 MovieClip "auloin" in Frame 6
onClipEvent (enterFrame) {
this._x = 250 - (_root.anglemoi * 2);
}
Instance of Symbol 62 MovieClip "boulle" in Frame 6
onClipEvent (enterFrame) {
hyp = Math.sqrt(((_root.xmoi - this.xxx) * (_root.xmoi - this.xxx)) + ((_root.ymoi - this.yyy) * (_root.ymoi - this.yyy)));
this.swapDepths(50000 - Math.round(hyp));
if (hyp < 20) {
_root.unCrocVal = 1000 - Math.round((getTimer() - _root.tempsdebut) / 100);
if (_root.unCrocVal <= 990) {
_root.saigne.gotoAndPlay(2);
_root.sonGrrr3.start(0, 1);
_root.nbboulles--;
_root.nbVies--;
if (_root.nbVies <= 0) {
_root.gotoAndStop("fin");
}
this.removeMovieClip();
}
}
if ((_root.nbPower <= ((4 + _root.niveau) - 2)) or (_root.nbBoulles < (7 + (2 * _root.niveau)))) {
_root.bouge(this);
}
if ((_root.nbPower == ((4 + _root.niveau) - 1)) or (_root.nbBoulles == (7 + (2 * _root.niveau)))) {
this.play();
}
angleboulle = (Math.atan2(this.yyy - _root.ymoi, this.xxx - _root.xmoi) * 180) / Math.PI;
angle = angleboulle - _root.anglemoi;
if (angle < -180) {
angle = angle + 360;
}
if (angle > 180) {
angle = angle - 360;
}
angleregard = ((-Math.atan2(this.pasy, this.pasx)) * 180) / Math.PI;
if (angleregard < -180) {
angleregard = angleregard + 360;
}
if (angleregard > 180) {
angleregard = angleregard - 360;
}
this.regard = Math.round((angleregard + 180) / 45);
profil = Math.round((angleboulle + 180) / 45) + this.regard;
this.aveccitrouille.citouille.gotoAndStop(profil);
if (_root.nbboulles < 11) {
this.aveccitrouille.planche.gotoAndStop(profil + 1);
}
this._x = 225 + (angle * 5);
this._xscale = 10000 / hyp;
this._yscale = 10000 / hyp;
}
Instance of Symbol 65 MovieClip "power" in Frame 6
onClipEvent (enterFrame) {
hyp = Math.sqrt(((_root.xmoi - this.xxx) * (_root.xmoi - this.xxx)) + ((_root.ymoi - this.yyy) * (_root.ymoi - this.yyy)));
this.swapDepths(50000 - Math.round(hyp));
if (hyp < 20) {
_root.unCrocVal = 1000 - Math.round((getTimer() - _root.tempsdebut) / 100);
if (_root.unCrocVal <= 990) {
_root.sonPower.start(0, 1);
_root.score = _root.score + _root.unCrocVal;
_root.nbpower--;
_root.scores.unCroc.gotoAndPlay(2);
this.removeMovieClip();
}
}
if (_root.nbpower == 0) {
_root.gotoAndStop("finNiveau");
}
angleboulle = (Math.atan2(this.yyy - _root.ymoi, this.xxx - _root.xmoi) * 180) / Math.PI;
angle = angleboulle - _root.anglemoi;
if (angle < -180) {
angle = angle + 360;
}
if (angle > 180) {
angle = angle - 360;
}
this._x = 225 + (angle * 5);
this._xscale = 10000 / hyp;
this._yscale = 10000 / hyp;
}
Instance of Symbol 70 MovieClip "viseur2" in Frame 6
/* no clip actions */
Frame 7
tempsdebut = getTimer();
Frame 8
creerLevel();
Frame 12
tempsdebut = getTimer();
_root.legende.swapDepths(51005);
_root.scores.swapDepths(51006);
stop();
Instance of Symbol 78 MovieClip in Frame 12
onClipEvent (enterFrame) {
_root.xmouse = _root.centre._xmouse;
if (_root.xmouse > 7) {
bg = (_root.xmouse * _root.xmouse) / 5000;
_root.anglemoi = _root.anglemoi + bg;
if (_root.anglemoi > 180) {
_root.anglemoi = _root.anglemoi - 360;
}
} else if (_root.xmouse < -7) {
bg = (_root.xmouse * _root.xmouse) / 5000;
_root.anglemoi = _root.anglemoi - bg;
if (_root.anglemoi < -180) {
_root.anglemoi = _root.anglemoi + 360;
}
}
}
Instance of Symbol 78 MovieClip in Frame 12
onClipEvent (enterFrame) {
_root.xmoi = _root.xmoi + (5 * Math.sin((((-_root.anglemoi) + 90) / 180) * Math.PI));
_root.ymoi = _root.ymoi + (5 * Math.cos((((-_root.anglemoi) + 90) / 180) * Math.PI));
if (Key.isDown(38)) {
_root.xmoi = _root.xmoi + (5 * Math.sin((((-_root.anglemoi) + 90) / 180) * Math.PI));
_root.ymoi = _root.ymoi + (5 * Math.cos((((-_root.anglemoi) + 90) / 180) * Math.PI));
}
if (Key.isDown(40)) {
_root.xmoi = _root.xmoi + (8 * Math.sin((((-_root.anglemoi) - 90) / 180) * Math.PI));
_root.ymoi = _root.ymoi + (8 * Math.cos((((-_root.anglemoi) - 90) / 180) * Math.PI));
}
if (Key.isDown(37)) {
_root.xmoi = _root.xmoi + (5 * Math.sin((((-_root.anglemoi) - 180) / 180) * Math.PI));
_root.ymoi = _root.ymoi + (5 * Math.cos((((-_root.anglemoi) - 180) / 180) * Math.PI));
}
if (Key.isDown(39)) {
_root.xmoi = _root.xmoi + (5 * Math.sin(((-_root.anglemoi) / 180) * Math.PI));
_root.ymoi = _root.ymoi + (5 * Math.cos(((-_root.anglemoi) / 180) * Math.PI));
}
}
Frame 13
viderLevel();
Frame 17
viderLevel();
temps = Math.round((getTimer() - tempsdebut) / 1000);
total = score - temps;
Symbol 13 Button
on (release) {
getURL ("http://www.eric-marchal.fr.st", "_blank");
}
Symbol 21 Button
on (release) {
_root.play();
}
Symbol 42 Button
on (press) {
if (_root.nbMunitions >= 1) {
_root.score = _root.score + 10;
_root.nbboulles--;
_root.plus10._visible = 1;
_root.sonboum.setVolume(50);
_root.sonboum.start(0, 1);
gotoAndPlay (2);
}
}
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 10
_root.plus10._visible = 0;
_parent.removeMovieClip();
Symbol 76 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 95 Button
on (release) {
niveau++;
nbpower = 4 + niveau;
gotoAndPlay (7);
}
Symbol 99 Button
on (release) {
_root.nbMunitions++;
getURL ("http://www.eric-marchal.fr.st/games", "_self");
}
Symbol 100 Button
on (release) {
_root.nbMunitions++;
getURL ("http://www.eric-marchal.fr.st/games/halloween.htm", "_self");
}