Frame 1
_root.onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndStop ("accueil");
_root.onEnterFrame = null;
} else {
_root.total = Math.floor(100 * (_root.getBytesLoaded() / _root.getBytesTotal())) + " %";
_root.miniSpirale2._rotation = _root.miniSpirale2._rotation + 10;
_root.miniSpirale._rotation = _root.miniSpirale._rotation + 10;
}
};
stop();
Frame 12
stop();
Frame 21
k = 0;
while (k < 100) {
neige.attachMovie("flocon", "flocon" + k, k);
k++;
}
var textIntroTemp = " \nAlors qu'une vague de froid frappe le paisible village de Konoha, une nouvelle menace, tapie dans l'ombre, s'appr\u00EAte \u00E0 s'abattre sur ses paisibles habitants...\n \nBravant le climat, un seul ninja, qui n'a pas oubli\u00E9 sa cagoule, est capable d'en venir \u00E0 bout, et de ramener \u00E0 nouveau la paix... ";
var iMax = textIntroTemp.length;
var i = 0;
var j = 0;
neige.swapDepths(2);
textIntro.swapDepths(3);
skipIntro.swapDepths(4);
impacts.swapDepths(5);
onEnterFrame = function () {
if (i <= iMax) {
j = j + 3;
i = Math.floor(j / 2);
textIntro.texte = textIntroTemp.substring(0, i);
if (i == iMax) {
_root.onEnterFrame = null;
impacts.play();
}
}
};
stop();
Frame 30
stop();
Frame 41
sndLancer = new Sound();
sndLancer.loadSound("lance1.mp3", false);
sndBunshin = new Sound();
sndBunshin.loadSound("bunshin.mp3", false);
sndImpact = new Sound();
sndImpact.loadSound("impact.mp3", false);
startGame = false;
endGame = false;
difficulty = 0;
hit = 0;
Instance of Symbol 88 MovieClip "zone1" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone6" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone2" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone4" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone3" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone5" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 88 MovieClip "zone7" in Frame 41
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 133 MovieClip "konohamaru" in Frame 41
onClipEvent (load) {
this.pts = 100;
this.tps = 200;
}
Instance of Symbol 160 MovieClip "moemi" in Frame 41
onClipEvent (load) {
this.pts = 10;
this.tps = 50;
}
Instance of Symbol 182 MovieClip "machin" in Frame 41
onClipEvent (load) {
this.pts = 10;
this.tps = 50;
}
Instance of Symbol 203 MovieClip "grosse" in Frame 41
onClipEvent (load) {
this.pts = 100;
this.tps = 100;
}
Instance of Symbol 231 MovieClip "sexy" in Frame 41
onClipEvent (load) {
this.pts = 500;
this.tps = 200;
}
Frame 42
if (startGame == false) {
annonces.gotoAndPlay("start");
onEnterFrame = function () {
viseur._x = _xmouse;
viseur._y = _ymouse;
_root.joueur._x = 200 + (_root._xmouse / 2);
if (annonces.finAnnonce == true) {
annonces.gotoAndStop("stop");
this.onEnterFrame = null;
this.gotoAndStop("jeu");
}
};
}
var cibleDepth = 10;
var bouleCibleDepth = 100;
var viseurDepth = 1000;
var bouleJoueurDepth = 10000;
var joueurDepth = 50000;
var annoncesDepth = 100000;
Mouse.hide();
joueur.vie = 4;
vie.gotoAndStop(joueur.vie + 1);
score = 0;
timer.swapDepths(joueurDepth + 1);
vie.swapDepths(joueurDepth + 2);
viseur.swapDepths(viseurDepth);
joueur.swapDepths(joueurDepth);
annonces.swapDepths(annoncesDepth);
neige.swapDepths(5000);
k = 0;
while (k < 100) {
neige.attachMovie("flocon", "flocon" + k, k);
k++;
}
tchrono = 5000;
timer.sec = int(tchrono / 100);
timer.milli = "00";
stop();
Frame 43
function fctNouvelleCible(nomCible, id) {
zoneVide = false;
while (!zoneVide) {
numZone = Math.floor((7 * Math.random()) + 1);
if (listeZones[numZone - 1] == false) {
listeZones[numZone - 1] = true;
nomZone = eval ("zone" + numZone);
zoneVide = true;
}
}
nomCible.id = id;
nomCible.numZone = numZone;
nomCible._x = Math.floor(nomZone._width * Math.random()) + nomZone._x;
nomCible._y = Math.floor(nomZone._height * Math.random()) + nomZone._y;
nomCible.timeMax = Math.floor((2 * Math.random()) + 10) * 12;
nomCible.etat = "init";
nomCible.onEnterFrame = function () {
switch (this.etat) {
case "init" :
sndBunshin.start();
this.etat = "appear";
this.timeBeforeDisappear = this.timeMax;
break;
case "appear" :
break;
case "stand" :
this.timeBeforeDisappear--;
if (this.timeBeforeDisappear > 0) {
if (this.timeBeforeDisappear < (this.timeMax - _root.waitBeforeShoot)) {
this.willAttack = Math.floor(Math.random() * 100);
if ((((((_root.difficulty == 0) && (this.willAttack < 10)) || ((_root.difficulty == 1) && (this.willAttack < 15))) || ((_root.difficulty == 2) && (this.willAttack < 25))) || ((_root.difficulty == 3) && (this.willAttack < 30))) || (((_root.difficulty == 4) || (_root.difficulty == 5)) && (this.willAttack < 40))) {
this.etat = "attack";
this.gotoAndPlay("attack");
}
}
} else {
this.etat = "disappear";
this.gotoAndPlay("disappear");
}
break;
case "touche" :
break;
case "attack" :
break;
case "disappear" :
}
};
}
function fctLancerBouleJoueur(ox, oy) {
sndLancer.start();
boule.duplicateMovieClip("bouleJoueur", bouleJoueurDepth);
bouleJoueur.ox = ox;
bouleJoueur.oy = oy;
bouleJoueur.ax = _root.ax;
bouleJoueur.ay = _root.ay;
bouleJoueur.step = 0;
bouleJoueur.stepMax = 5;
_root.bouleJoueur.onEnterFrame = function () {
this._xscale = (this._yscale = 100 / this.step);
this._x = this.ox + ((this.step * (this.ax - this.ox)) / this.stepMax);
this._y = (this.oy - (100 * Math.sin((Math.PI * this.step) / this.stepMax))) + ((this.step * (this.ay - this.oy)) / this.stepMax);
if (this.step == this.stepMax) {
i = 0;
while (i < nbCibleMax) {
if (listeCibles[i] != -1) {
var _local3 = listeCibles[i];
trace("av =" + _local3.etat);
if (((this._x < _local3.xMax) && (this._x > _local3.xMin)) && ((this._y < _local3.yMax) && (this._y > _local3.yMin))) {
sndImpact.start();
_local3.etat = "touche";
_local3.gotoAndPlay(_local3.etat);
updateAfterEvent();
_root.hit++;
fctCheckDifficulty();
_root.score = _root.score + _local3.pts;
_root.tchrono = _root.tchrono + _local3.tps;
if (_root.tchrono > 9999) {
_root.tchrono = 9999;
}
trace("av =" + _local3.etat);
}
}
i++;
}
this.removeMovieClip();
this.onEnterFrame = null;
}
this.step++;
};
}
function fctLancerBouleCible(ox, oy, tireur) {
sndLancer.start();
nbBoule = 1;
boule.duplicateMovieClip("bouleTireur" + nbBoule, nbBoule + bouleCibleDepth);
nomBoule = eval ("bouleTireur" + nbBoule);
nomBoule.ox = ox;
nomBoule.oy = oy;
nomBoule.ax = 400;
nomBoule.ay = 240;
nomBoule.i = 0;
nomBoule.iMax = 10;
nomBoule.tireur = eval (tireur);
_root.nomBoule.onEnterFrame = function () {
this._xscale = (this._yscale = (this.i * 100) / this.iMax);
this._x = this.ox + ((this.i * (this.ax - this.ox)) / this.iMax);
this._y = (this.oy - (100 * Math.sin((Math.PI * this.i) / this.iMax))) + ((this.i * (this.ay - this.oy)) / this.iMax);
if (this.i == this.iMax) {
if (_root.joueur.etat == "aim") {
tireur = eval (tireur);
tireur.gotoAndPlay("indaface");
sndImpact.start();
_root.joueur.etat = "touche";
_root.joueur.gotoAndPlay(_root.joueur.etat);
_root.joueur.vie--;
_root.vie.gotoAndStop(_root.joueur.vie + 1);
} else if (tireur.etat != "touche") {
tireur.gotoAndPlay("miss");
}
this.removeMovieClip();
this.onEnterFrame = null;
}
this.i++;
};
}
function fctCheckEndGame(vieJoueur, timeJeu) {
if (timeJeu == 0) {
joueur.etat = "win";
return(true);
}
if (vieJoueur == 0) {
joueur.etat = "loose";
return(true);
}
return(false);
}
function allDisappear() {
i = 0;
while (i < nbCibleMax) {
if (listeCibles[i] != 0) {
_root.listeCibles[i].gotoAndPlay("disappear");
}
i++;
}
fctEndGame();
}
function fctEndGame() {
_root.onEnterFrame = null;
annonces.gotoAndPlay(joueur.etat);
clearInterval(timeInterval);
konohamaru.duplicateMovieClip("cible0", cibleDepth);
nomCible = cible0;
viseur._x = -1000;
viseur._y = -1000;
nomCible._x = 400;
nomCible._y = 150;
Mouse.show();
}
function fctCheckDifficulty() {
if (hit == 5) {
difficulty = 1;
nbCibleMax = 2;
listeCibles.push(0);
} else if (hit == 12) {
difficulty = 2;
nbCibleMax = 3;
listeCibles.push(0);
} else if (hit == 20) {
difficulty = 3;
nbCibleMax = 5;
listeCibles.push(0, 0);
} else if (hit == 36) {
difficulty = 4;
} else if (hit == 52) {
difficulty = 5;
}
}
nbCibleMax = 1;
waitNewBunshin = Math.floor((1 * Math.random()) + 1) * 24;
listeZones = new Array(false, false, false, false, false, false, false);
listeCibles = new Array(nbCibleMax);
i = 0;
while (i < nbCibleMax) {
listeCibles[i] = 0;
i++;
}
joueur.etat = "aim";
onEnterFrame = function () {
viseur._x = _xmouse;
viseur._y = _ymouse;
if (joueur.etat != "touche") {
_root.joueur._x = 200 + (_root._xmouse / 2);
} else {
_root.joueur._x = 400;
}
_root.waitBeforeShoot = (((((24 * (_root.difficulty == 0)) + (20 * (_root.difficulty == 1))) + (16 * (_root.difficulty == 2))) + (12 * (_root.difficulty == 3))) + (6 * (_root.difficulty == 4))) + (3 * (_root.difficulty == 5));
spaceDown = false;
if (Key.isDown(32) && (!endGame)) {
spaceDown = true;
}
if (((spaceDown == true) && (joueur.etat != "touche")) && (joueur.etat != "lancer")) {
joueur.etat = "hide";
joueur.gotoAndStop("hide");
} else if (joueur.etat == "hide") {
joueur.etat = "aim";
joueur.gotoAndStop("aim");
}
if (waitNewBunshin == 0) {
waitNewBunshin = Math.floor(((12 * ((_root.difficulty != 4) && (_root.difficulty != 5))) + 12) + ((((((72 * (_root.difficulty == 0)) + (48 * (_root.difficulty == 1))) + (32 * (_root.difficulty == 2))) + (24 * (_root.difficulty == 3))) + (12 * (_root.difficulty == 4))) * Math.random()));
(i = 0);
(nbCible = -1);
while (i < nbCibleMax) {
if ((listeCibles[i] == 0) && (nbCible == -1)) {
nbCible = i;
var nomCible = ("cible" + i);
var randCible = (Math.floor(Math.random() * 9) + 1);
if (randCible <= 5) {
konohamaru.duplicateMovieClip(nomCible, i + cibleDepth);
} else if (randCible == 6) {
moemi.duplicateMovieClip(nomCible, i + cibleDepth);
} else if (randCible == 7) {
machin.duplicateMovieClip(nomCible, i + cibleDepth);
} else if (randCible == 8) {
grosse.duplicateMovieClip(nomCible, i + cibleDepth);
} else if (randCible == 9) {
sexy.duplicateMovieClip(nomCible, i + cibleDepth);
}
nomCible = eval (nomCible);
listeCibles[i] = nomCible;
}
i++;
}
if (nbCible != -1) {
fctNouvelleCible(nomCible, nbCible);
}
}
waitNewBunshin--;
endGame = _root.fctCheckEndGame(joueur.vie, tchrono);
if (endGame) {
allDisappear();
}
};
onMouseUp = function () {
if (joueur.etat == "aim") {
joueur.gotoAndPlay("lancer");
joueur.etat = "lancer";
ax = _root._xmouse;
ay = _root._ymouse;
}
};
timeInterval = setInterval(function () {
if (tchrono > 0) {
tchrono = tchrono - 10;
}
if (tchrono == 1000) {
timer.gotoAndStop("10sec");
} else if (tchrono > 1000) {
timer.gotoAndStop(1);
}
timer.sec = int(tchrono / 100);
if (timer.sec < 10) {
timer.sec = "0" + timer.sec;
}
timer.milli = tchrono - (int(tchrono / 100) * 100);
if (timer.milli < 10) {
timer.milli = "0" + timer.milli;
}
updateAfterEvent();
}, 50);
stop();
Symbol 2 MovieClip [flocon] Frame 1
movieWidth = 800;
movieHeight = 480;
i = 1 + (Math.random() * 2);
var k = (-3.14159265358979 + (Math.random() * Math.PI));
this._xscale = (this._yscale = 50 + (Math.random() * 100));
this._alpha = 75 + (Math.random() * 100);
this._x = -10 + (Math.random() * movieWidth);
this._y = -10 + (Math.random() * movieHeight);
this.onEnterFrame = function () {
rad = rad + ((k / 180) * Math.PI);
this._x = this._x - Math.cos(rad);
this._y = this._y + i;
if (this._y >= movieHeight) {
this._y = -5;
}
if ((this._x >= movieWidth) || (this._x <= 0)) {
this._x = -10 + (Math.random() * movieWidth);
this._y = -5;
}
};
Symbol 37 MovieClip Frame 52
gotoAndPlay ("loop");
Symbol 42 Button
on (release) {
gotoAndPlay ("intro");
}
Symbol 53 MovieClip Frame 220
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 45
_root.gotoAndPlay("preloadJeu");
_parent.fondIntro.removeMovieClip();
_parent.textIntro.removeMovieClip();
_parent.skipIntro.removeMovieClip();
this.removeMovieClip();
stop();
Symbol 82 Button
on (release) {
_parent.onEnterFrame = null;
_parent.impacts.play();
}
Symbol 105 MovieClip Frame 1
this.etat = "aim";
stop();
Symbol 105 MovieClip Frame 49
this.gotoAndStop("aim");
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip Frame 50
onClipEvent (load) {
_parent.ox = _parent._x + this._x;
_parent.oy = _parent._y + this._y;
}
Symbol 105 MovieClip Frame 57
_root.fctLancerBouleJoueur(ox, oy);
Symbol 105 MovieClip Frame 60
etat = "aim";
gotoAndStop ("aim");
Symbol 105 MovieClip Frame 61
stop();
Symbol 133 MovieClip Frame 1
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 133 MovieClip Frame 6
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 133 MovieClip Frame 6
onClipEvent (load) {
this._visible = false;
}
Symbol 133 MovieClip Frame 13
this.etat = "stand";
stop();
Symbol 133 MovieClip Frame 19
stop();
Symbol 133 MovieClip Frame 20
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 133 MovieClip Frame 31
gotoAndPlay ("disappear");
Symbol 133 MovieClip Frame 32
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
zoneHit._visible = false;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 133 MovieClip Frame 32
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 97 MovieClip in Symbol 133 MovieClip Frame 32
onClipEvent (load) {
_parent.ox = _parent._x + this._x;
_parent.oy = _parent._y + this._y;
this._visible = false;
}
Symbol 133 MovieClip Frame 36
_root.fctLancerBouleCible(ox, oy, eval ("_root." + this._name));
Symbol 133 MovieClip Frame 44
stop();
Symbol 133 MovieClip Frame 45
this.etat = "disappear";
Symbol 133 MovieClip Frame 55
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 133 MovieClip Frame 69
gotoAndPlay ("disappear");
Symbol 133 MovieClip Frame 84
gotoAndPlay ("disappear");
Symbol 160 MovieClip Frame 6
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 160 MovieClip Frame 6
onClipEvent (load) {
this._visible = false;
}
Symbol 160 MovieClip Frame 13
this.etat = "stand";
stop();
Symbol 160 MovieClip Frame 39
gotoAndPlay ("stand");
Symbol 160 MovieClip Frame 40
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 160 MovieClip Frame 50
this.etat = "disappear";
Symbol 160 MovieClip Frame 60
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 160 MovieClip Frame 61
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 160 MovieClip Frame 76
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 182 MovieClip Frame 6
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 182 MovieClip Frame 6
onClipEvent (load) {
this._visible = false;
}
Symbol 182 MovieClip Frame 13
this.etat = "stand";
stop();
Symbol 182 MovieClip Frame 55
gotoAndPlay ("stand");
Symbol 182 MovieClip Frame 56
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 182 MovieClip Frame 64
this.etat = "disappear";
Symbol 182 MovieClip Frame 74
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 182 MovieClip Frame 75
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 182 MovieClip Frame 78
this.etat = "disappear";
Symbol 182 MovieClip Frame 88
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 203 MovieClip Frame 6
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 203 MovieClip Frame 6
onClipEvent (load) {
this._visible = false;
}
Symbol 203 MovieClip Frame 13
this.etat = "stand";
stop();
Symbol 203 MovieClip Frame 24
gotoAndPlay ("stand");
Symbol 203 MovieClip Frame 25
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 203 MovieClip Frame 37
this.etat = "disappear";
Symbol 203 MovieClip Frame 47
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 203 MovieClip Frame 48
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 203 MovieClip Frame 55
this.etat = "disappear";
Symbol 203 MovieClip Frame 65
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 231 MovieClip Frame 6
xMax = (zoneHit._width + zoneHit._x) + this._x;
xMin = zoneHit._x + this._x;
yMax = (zoneHit._height + zoneHit._y) + this._y;
yMin = zoneHit._y + this._y;
Instance of Symbol 88 MovieClip "zoneHit" in Symbol 231 MovieClip Frame 6
onClipEvent (load) {
this._visible = false;
}
Symbol 231 MovieClip Frame 13
this.etat = "stand";
stop();
Symbol 231 MovieClip Frame 22
gotoAndPlay ("stand");
Symbol 231 MovieClip Frame 23
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 231 MovieClip Frame 37
this.etat = "disappear";
Symbol 231 MovieClip Frame 47
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 231 MovieClip Frame 48
xMin = 0;
xMax = 0;
yMin = 0;
yMax = 0;
Symbol 231 MovieClip Frame 57
this.etat = "disappear";
Symbol 231 MovieClip Frame 67
_root.listeCibles[this.id] = 0;
_root.listeZones[this.numZone - 1] = false;
this.removeMovieClip();
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 2
stop();
Symbol 242 MovieClip Frame 3
stop();
Symbol 242 MovieClip Frame 4
stop();
Symbol 242 MovieClip Frame 5
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 6
stop();
Symbol 263 Button
on (release) {
_parent.cible0.removeMovieClip();
_parent.timer.removeMovieClip();
_parent.vie.removeMovieClip();
_parent.viseur.removeMovieClip();
_parent.joueur.removeMovieClip();
_parent.neige.removeMovieClip();
_parent.impacts.play();
this.removeMovieClip();
}
Symbol 265 MovieClip Frame 1
finAnnonce = false;
Symbol 265 MovieClip Frame 76
stop();
finAnnonce = true;
Symbol 265 MovieClip Frame 126
stop();
Symbol 265 MovieClip Frame 176
stop();