|
Nombre aleatoire - Randomization
\n'
document.write(temp);
pchev01=0;
pchev02=0;
pchev03=0;
pchev04=0;
choix="";
gagne=0;
id=0;
function rando_DoFSCommand(cmd, arg)
{
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var map = InternetExplorer ? rando : document.embeds[0];
if (cmd=="depart")
{
init();
}
if (cmd=="newstart")
{
init();
map.GotoFrame(52);
}
if (cmd=="start")
{
choix=arg;
map.GotoFrame(53);
map.TGotoFrame("_flash0/chev01/cheval1",1);
map.TPlay("_flash0/chev01/cheval1");
map.TGotoFrame("_flash0/chev02/cheval2",1);
map.TPlay("_flash0/chev02/cheval2");
map.TGotoFrame("_flash0/chev03/cheval3",1);
map.TPlay("_flash0/chev03/cheval3");
map.TGotoFrame("_flash0/chev04/cheval4",1);
map.TPlay("_flash0/chev04/cheval4");
map.TGotoFrame("_flash0/result",3);
map.TGotoFrame("_flash0/sonc",2);
if (choix=="bleu")
{
map.TGotoFrame("_flash0/coulchoix",1);
}
if (choix=="rouge")
{
map.TGotoFrame("_flash0/coulchoix",2);
}
if (choix=="violet")
{
map.TGotoFrame("_flash0/coulchoix",3);
}
if (choix=="vert")
{
map.TGotoFrame("_flash0/coulchoix",4);
}
map.TGotoFrame("_flash0/result",3);
demarre()
}
}
function demarre()
{
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var map = InternetExplorer ? rando : document.embeds[0];
if(pchev01<200 & pchev02<200 & pchev03<200 & pchev04<200)
{
pchev01= pchev01+Math.round(Math.random()*4);
pchev02= pchev02+Math.round(Math.random()*4);
pchev03= pchev03+Math.round(Math.random()*4);
pchev04= pchev04+Math.round(Math.random()*4);
map.TGotoFrame("_flash0/chev01",pchev01);
map.TGotoFrame("_flash0/chev02",pchev02);
map.TGotoFrame("_flash0/chev03",pchev03);
map.TGotoFrame("_flash0/chev04",pchev04);
ID = setTimeout('demarre()',200);
}
else
{
clearTimeout(ID);
map.TGotoFrame("_flash0/chev01/cheval1",12);
map.TGotoFrame("_flash0/chev02/cheval2",12);
map.TGotoFrame("_flash0/chev03/cheval3",12);
map.TGotoFrame("_flash0/chev04/cheval4",12);
map.TGotoFrame("_flash0/sonc",3);
gagne=0;
if (choix=="bleu" & pchev01>pchev02 & pchev01>pchev03 & pchev01>pchev04)
{
gagne=1;
}
if (choix=="rouge" & pchev02>pchev01 & pchev02>pchev03 & pchev02>pchev04)
{
gagne=1;
}
if (choix=="violet" & pchev03>pchev01 & pchev03>pchev02 & pchev03>pchev04)
{
gagne=1;
}
if (choix=="vert" & pchev04>pchev01 & pchev04>pchev02 & pchev04>pchev03)
{
gagne=1;
}
if (gagne==1)
{
map.TGotoFrame("_flash0/result",1);
}
else
{
map.TGotoFrame("_flash0/result",2);
}
pchev01=0;
pchev02=0;
pchev03=0;
pchev04=0;
}
}
function init()
{
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var map = InternetExplorer ? rando : document.embeds[0];
map.TGotoFrame("_flash0/chev01/cheval1",12);
map.TGotoFrame("_flash0/chev02/cheval2",12);
map.TGotoFrame("_flash0/chev03/cheval3",12);
map.TGotoFrame("_flash0/chev04/cheval4",12);
map.TGotoFrame("_flash0/coulchoix",1);
map.TGotoFrame("_flash0/result",0);
map.TGotoFrame("_flash0/chev01",0);
map.TGotoFrame("_flash0/chev02",0);
map.TGotoFrame("_flash0/chev03",0);
map.TGotoFrame("_flash0/chev04",0);
pchev01=0;
pchev02=0;
pchev03=0;
pchev04=0;
}
vous êtes le visiteur $$CPT$$ depuis le 17/11/1997
|