//Color-Word par Walter Siracusa //1=rouge, 2=vert, 3=bleu, 4=jaune, 5=blanc, 6=gris NB_COL=18; //3 pastilles de même couleur x 6 couleurs différentes tab_bool=new Array(); good_snd=new Sound(); good_snd.attachSound("good_snd.mp3"); bad_snd=new Sound(); bad_snd.attachSound("bad_snd.mp3"); end_snd=new Sound(); end_snd.attachSound("end_snd.mp3"); zik_snd=new Sound(); zik_snd.attachSound("zik_snd.mp3"); zik_snd.start(0,1000); Score=0; score_txt.text=Score; function changeMode(){ colorword_rnd=random(36)+1; colorword_mc.gotoAndStop(colorword_rnd); Mode=random(2); if(Mode){ //Mot num_fnd=Math.ceil(colorword_rnd/6); couleur_mc._alpha=20; mot_mc._alpha=100; }else{ //Couleur du mot num_fnd=((colorword_rnd-1)%6)+1; couleur_mc._alpha=100; mot_mc._alpha=20; } } changeMode(); function addCol(val){ tab_bool[val]=true; num=(val%6)+1; clip=_root.attachMovie("col"+num,"col"+val,_root.getNextHighestDepth()); clip.val=val; clip.num=num; clip._x=random(510)+20; clip._y=random(295)+65; clip.h=random(2); clip.v=random(2); clip.vt=random(2)+1; clip.onRelease=function(){ if(this._currentframe==10) this.play(); if(this.num==num_fnd){ Score+=30; score_txt.text=Score; good_snd.start(); }else{ if(Score>=10) Score-=10; score_txt.text=Score; bad_snd.start(); this._alpha=50; } changeMode(); } } for(i=0;i520) clip.h=false; if(clip._y<60) clip.v=true; else if(clip._y>360) clip.v=false; if(clip.h) clip._x+=clip.vt; else clip._x-=clip.vt; if(clip.v) clip._y+=clip.vt; else clip._y-=clip.vt; } }