//DOGZ par Walter Siracusa function newFluffy(){ //Fluffy à trouver Num=random(NB_FLUFFY)+1; fluffy_mc.allfluffy_mc.gotoAndStop(Num); //Posé sur la scène fluffy_mc.gotoAndStop("stop"); //Mélange Tab for(i=1;i<100;i++){ a=random(NB_FLUFFY)+1; b=random(NB_FLUFFY)+1 tmp=Tab[a]; Tab[a]=Tab[b]; Tab[b]=tmp; } //Change les clips en fonction de Tab for(i=1;i<=NB_FLUFFY;i++){ clip=_root["fluffy_mc"+i]; clip.allfluffy_mc.gotoAndStop(Tab[i]); clip.gotoAndPlay(random(15)); } //Timer initial Timer0=getTimer(); } function timing(){ Game=false; clearInterval(id_timing); for(i=1;i<=NB_FLUFFY;i++) _root["fluffy_mc"+i]._alpha=50;; waf_mc.play(); } //---------------------------------------- LG_GRILLE=5; HT_GRILLE=4; NB_FLUFFY=(LG_GRILLE*HT_GRILLE)-1; LG_PIC=94; HT_PIC=112 Game=true; Num=undefined; Score=0; score_txt.text=Score; Timer0=undefined; dogbark2_snd=new Sound(); dogbark2_snd.attachSound("dogbark2.wav"); dogrr_snd=new Sound(); dogrr_snd.attachSound("dogrr.wav"); //Place tous les fluffy sauf le 1er k=1; for(j=0;j Waf dogbark2_snd.start(); //Compare le timer pour l'attribution des points timer=getTimer()-Timer0; if(timer<=3000) points=Math.ceil(150-(150*timer)/3000); else points=0; trace(points); Score+=points; score_txt.text=Score; newFluffy(); }else dogrr_snd.start(); //Fluffy différent => Grrrr } } } } //Cadre au dessus du 1er fluffy attachMovie("frame_mc","frame_mc",_root.getNextHighestDepth(),{_x:0,_y:0}); Tab=new Array(); for(i=1;i<=NB_FLUFFY;i++) Tab[i]=i; id_timing=setInterval(timing,45000); //45s de jeu newFluffy();