home *** CD-ROM | disk | FTP | other *** search
- function level10()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1];
- ligne2 = [1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,1];
- ligne3 = [1,0,1,2,1,2,2,2,2,2,2,2,2,2,2,1,2,1,0,1];
- ligne4 = [1,0,1,2,1,2,1,2,2,2,2,2,2,1,2,1,2,1,0,1];
- ligne5 = [1,0,1,2,1,2,1,2,2,2,2,2,2,1,2,1,2,1,0,1];
- ligne6 = [1,0,1,2,1,2,1,2,2,2,2,2,2,1,2,1,2,1,0,1];
- ligne7 = [1,0,1,2,1,2,1,4,3,3,3,2,2,1,2,1,2,1,0,1];
- ligne8 = [1,0,1,2,1,2,1,2,2,2,2,2,2,1,2,1,2,1,0,1];
- ligne9 = [1,0,1,2,1,2,1,2,2,2,2,2,2,1,2,1,2,1,0,1];
- ligne10 = [1,0,1,2,1,2,2,2,2,2,2,2,2,2,2,1,2,1,0,1];
- ligne11 = [1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,1];
- ligne12 = [1,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level9()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,0,2,2,2,0,1,0,0,0,0,1,2,2,2,2,2,2,2,1];
- ligne2 = [1,2,1,1,1,2,1,0,0,0,0,1,2,1,1,1,1,1,2,1];
- ligne3 = [1,2,1,0,1,2,1,1,1,1,1,1,2,1,0,0,0,1,2,1];
- ligne4 = [1,2,1,0,1,2,1,0,0,0,0,0,2,1,0,0,0,1,2,1];
- ligne5 = [1,2,1,1,1,2,1,0,0,0,0,1,2,1,1,1,1,1,2,1];
- ligne6 = [1,2,2,2,2,2,0,0,0,0,0,1,0,2,2,2,2,2,2,1];
- ligne7 = [1,2,2,2,2,0,1,4,3,3,3,1,0,0,2,2,2,2,2,1];
- ligne8 = [1,2,1,1,1,2,1,0,0,0,0,0,2,1,1,1,1,1,2,1];
- ligne9 = [1,2,1,0,1,2,1,1,1,1,1,1,2,1,0,0,0,1,2,1];
- ligne10 = [1,2,1,0,1,2,1,0,0,0,0,1,2,1,0,0,0,1,2,1];
- ligne11 = [1,2,1,1,1,2,1,0,0,0,0,1,2,1,1,1,1,1,2,1];
- ligne12 = [1,0,2,2,2,0,1,0,0,0,0,1,2,2,2,2,2,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level8()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne2 = [1,2,0,1,1,2,2,2,0,0,1,0,2,2,2,1,1,0,2,1];
- ligne3 = [1,2,1,1,0,0,2,1,1,1,1,1,1,2,0,0,1,1,2,1];
- ligne4 = [1,2,1,0,1,2,2,2,0,1,0,0,2,2,2,1,0,1,2,1];
- ligne5 = [1,2,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,2,1];
- ligne6 = [1,2,2,0,0,0,1,1,0,0,0,2,1,1,0,0,0,0,2,1];
- ligne7 = [1,2,0,2,0,1,1,4,3,3,3,0,0,1,1,0,0,0,2,1];
- ligne8 = [1,2,1,1,2,0,0,0,0,2,1,1,1,1,2,0,0,0,2,1];
- ligne9 = [1,2,0,1,1,2,0,0,2,1,1,2,2,1,1,2,0,0,2,1];
- ligne10 = [1,2,0,0,1,1,2,2,1,1,2,0,0,2,1,1,2,0,2,1];
- ligne11 = [1,2,0,0,0,1,1,1,1,2,0,0,0,0,2,1,1,2,2,1];
- ligne12 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level7()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,0,0,0,0,2,2,1,1,2,2,1,1,2,2,0,0,0,0,1];
- ligne2 = [1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,1];
- ligne3 = [1,0,2,1,0,0,2,2,0,1,1,0,2,2,0,0,1,2,0,1];
- ligne4 = [1,0,2,1,0,1,1,1,1,1,1,1,1,1,1,0,1,2,0,1];
- ligne5 = [1,0,2,1,2,1,1,1,1,2,2,1,1,1,1,2,1,2,0,1];
- ligne6 = [1,0,2,2,2,2,0,1,0,0,0,0,0,0,2,2,2,2,0,1];
- ligne7 = [1,0,2,2,2,2,0,4,3,3,3,0,1,0,2,2,2,2,0,1];
- ligne8 = [1,0,2,1,2,1,1,1,1,2,2,1,1,1,1,2,1,2,0,1];
- ligne9 = [1,0,2,1,0,1,1,1,1,1,1,1,1,1,1,0,1,2,0,1];
- ligne10 = [1,0,2,1,0,0,0,0,0,1,1,0,0,0,0,0,1,2,0,1];
- ligne11 = [1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,1];
- ligne12 = [1,0,0,0,0,2,2,1,1,2,2,1,1,2,2,0,0,0,0,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level6()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
- ligne2 = [1,2,0,1,1,2,1,1,2,1,1,2,1,1,2,1,1,0,2,1];
- ligne3 = [1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,1];
- ligne4 = [1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1];
- ligne5 = [1,2,2,2,0,2,2,2,2,2,2,2,2,2,2,0,2,2,2,1];
- ligne6 = [1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1];
- ligne7 = [1,0,1,1,1,1,1,4,3,3,3,1,1,1,1,1,1,1,0,1];
- ligne8 = [1,2,2,2,0,2,2,2,2,2,2,2,2,2,2,0,2,2,2,1];
- ligne9 = [1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,1,0,1,0,1];
- ligne10 = [1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,1];
- ligne11 = [1,2,0,1,1,2,1,1,2,1,1,2,1,1,2,1,1,0,2,1];
- ligne12 = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level5()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne2 = [1,2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,2,1];
- ligne3 = [1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1];
- ligne4 = [1,0,1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1];
- ligne5 = [1,2,2,2,1,2,2,2,2,2,2,2,2,2,2,1,2,2,2,1];
- ligne6 = [1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,1];
- ligne7 = [1,0,1,0,0,0,1,4,3,3,3,0,0,1,0,0,0,1,0,1];
- ligne8 = [1,2,2,2,1,2,2,2,2,2,2,2,2,2,2,1,2,2,2,1];
- ligne9 = [1,0,1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1];
- ligne10 = [1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1];
- ligne11 = [1,2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,2,1];
- ligne12 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level4()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,1];
- ligne2 = [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,2,1];
- ligne3 = [1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,1];
- ligne4 = [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,2,1];
- ligne5 = [1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,1];
- ligne6 = [1,2,1,0,1,0,1,0,1,0,1,0,1,0,1,2,1,2,2,1];
- ligne7 = [1,2,0,2,0,2,0,4,3,3,3,2,0,2,0,2,0,2,2,1];
- ligne8 = [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,2,1];
- ligne9 = [1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,1];
- ligne10 = [1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,1];
- ligne11 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne12 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level1()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1];
- ligne2 = [1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,2,1];
- ligne3 = [1,2,1,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,1];
- ligne4 = [1,0,1,0,1,1,1,1,1,1,2,1,1,1,1,1,2,1,2,1];
- ligne5 = [1,2,1,2,1,2,2,0,0,0,0,0,0,2,2,1,0,1,0,1];
- ligne6 = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,2,1];
- ligne7 = [1,2,0,2,1,0,0,4,3,3,3,0,0,0,0,0,0,0,0,1];
- ligne8 = [1,0,1,0,1,2,2,0,0,0,0,0,0,2,2,1,2,1,2,1];
- ligne9 = [1,2,1,2,1,1,1,1,1,2,1,1,1,1,1,1,0,1,0,1];
- ligne10 = [1,0,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,1,2,1];
- ligne11 = [1,2,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1];
- ligne12 = [1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level3()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,1];
- ligne2 = [1,1,1,1,1,2,1,0,1,0,0,0,0,0,1,2,2,2,2,1];
- ligne3 = [1,2,2,2,2,2,1,0,1,1,1,1,1,0,0,2,1,2,2,1];
- ligne4 = [1,2,2,2,2,2,1,0,0,0,0,0,1,1,0,2,1,2,1,1];
- ligne5 = [1,1,1,1,1,2,1,0,0,0,0,0,0,1,0,2,1,2,2,1];
- ligne6 = [1,0,0,0,0,2,1,1,1,1,1,1,0,1,0,2,1,1,2,1];
- ligne7 = [1,0,1,1,0,2,0,4,3,3,3,1,0,1,0,2,1,2,2,1];
- ligne8 = [1,0,0,0,0,2,1,1,1,1,1,1,0,1,0,2,1,2,1,1];
- ligne9 = [1,0,1,1,0,2,1,0,0,0,0,0,0,1,0,2,1,2,2,1];
- ligne10 = [1,0,1,1,0,2,1,0,1,1,1,1,1,1,0,1,1,1,2,1];
- ligne11 = [1,2,2,1,0,2,0,0,1,1,1,1,1,1,0,1,1,1,2,1];
- ligne12 = [1,2,2,2,0,2,1,0,0,0,0,0,0,0,0,0,0,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function level2()
- {
- MonSon = new Sound();
- MonSon.attachSound("applause");
- MonSon.start();
- manges = 0;
- ligne0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- ligne1 = [1,2,2,2,1,1,2,2,2,2,2,2,2,2,0,0,2,2,2,1];
- ligne2 = [1,2,1,2,1,1,0,1,1,1,1,1,1,0,1,1,2,1,2,1];
- ligne3 = [1,2,1,2,0,1,0,0,0,1,0,0,0,0,1,1,2,1,2,1];
- ligne4 = [1,2,2,2,0,1,1,1,0,1,0,1,1,0,1,1,2,2,2,1];
- ligne5 = [1,1,1,2,0,0,1,1,0,1,0,1,1,0,0,0,2,1,1,1];
- ligne6 = [1,1,2,2,0,0,1,1,0,1,0,1,1,0,0,0,2,2,1,1];
- ligne7 = [1,1,2,2,2,2,0,4,3,3,3,1,1,0,2,2,2,2,1,1];
- ligne8 = [1,1,1,2,1,0,0,0,0,1,0,0,0,0,0,1,2,1,1,1];
- ligne9 = [1,2,2,2,1,0,1,0,0,1,0,0,0,0,0,1,2,2,2,1];
- ligne10 = [1,2,1,2,1,0,1,1,1,1,1,1,1,1,1,1,2,1,2,1];
- ligne11 = [1,2,1,2,1,0,0,1,1,0,0,0,0,0,0,1,2,1,2,1];
- ligne12 = [1,2,2,2,0,2,2,2,2,2,2,2,2,2,2,0,2,2,2,1];
- ligne13 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
- calcultotal();
- restart();
- }
- function affiche_level()
- {
- var _loc1_ = _root;
- i = 1;
- while(i <= long)
- {
- corps.duplicateMovieClip("" + i,i);
- _loc1_["" + i]._x = boax[i];
- _loc1_["" + i]._x = boay[i];
- i++;
- }
- i = 0;
- while(i <= 13)
- {
- j = 0;
- while(j <= 19)
- {
- switch(_loc1_["ligne" + i][j])
- {
- case 1:
- duplicate(mur,i,j);
- break;
- case 2:
- duplicate(fruit,i,j);
- }
- j++;
- }
- i++;
- }
- }
- function duplicate(clip, i, j)
- {
- var _loc1_ = j;
- var _loc2_ = i;
- var _loc3_ = clip;
- _loc3_.duplicateMovieClip(_loc3_._name + (5000 - (20 * _loc2_ + _loc1_)),5000 - (20 * _loc2_ + _loc1_));
- setProperty(_loc3_._name + (5000 - (20 * _loc2_ + _loc1_)), _X, 30 * _loc1_ + 15);
- setProperty(_loc3_._name + (5000 - (20 * _loc2_ + _loc1_)), _Y, 30 * _loc2_ + 15);
- }
- function removeall()
- {
- i = 4;
- while(i <= long)
- {
- removeMovieClip("" + i);
- i++;
- }
- }
- function resetlevel()
- {
- var _loc1_ = _root;
- i = 5000;
- while(i >= 4500)
- {
- _loc1_["fruit" + i].removeMovieClip();
- _loc1_["mur" + i].removeMovieClip();
- i--;
- }
- }
- function restart()
- {
- var _loc1_ = _root;
- resetlevel();
- removeall();
- long = 4;
- manges = 0;
- corpsok = true;
- _loc1_.ligne = _loc1_.colonne = 7;
- boax = [225,255,285,315];
- boay = [225,225,225,225];
- tete._x = _loc1_.boax[0];
- tete._y = _loc1_.boay[0];
- tete._rotation = -90;
- _loc1_.affiche_level();
- }
- function calcultotal()
- {
- var _loc1_ = _root;
- total = 0;
- i = 0;
- while(i <= 13)
- {
- j = 0;
- while(j <= 19)
- {
- if(_loc1_["ligne" + i][j] == 2)
- {
- total++;
- }
- j++;
- }
- i++;
- }
- }
- stop();
- sound1 = new Sound();
- sound2 = new Sound();
- sound3 = new Sound();
- sound3.attachSound("yeah");
- sound1.attachSound("mange");
- sound2.attachSound("mort");
- serveur = true;
- long = 4;
- level = 1;
- vie = 3;
- score = 0;
- total = manges = 0;
- boax = [225,255,285,315];
- boay = [225,225,225,225];
- ligne = colonne = 7;
- corpsok = true;
- _root["level" + level]();
-