Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

CRASH BANDICOOT (RACING SIMPLE) VERSION JAVASCRIPT


Information sur la source

Catégorie :Jeux Niveau : Débutant Date de création : 16/12/2003 Vu / téléchargé: 6 205 / 549

Note :
7 / 10 - par 7 personnes
7,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (11)
Ajouter un commentaire et/ou une note

Description

Voila je vais vous passer la page de mon site
ou vous trouverez le jeu executable  mais pour la source c'est assez longue
mais je vais tout de même la placer !
Aller dans le zip pour avoir l'image et le fichier midi !

 

Source

  • <bgsound src="racing.mid" loop="1000">
  • <body bgcolor="#000000" text="#FFFFFF" link="#00FF00">
  • <head>
  • <SCRIPT>
  • function browser_check() {
  • var lecture = "Votre navigateur ne supporte pas le DHTML\n"
  • +"- cette page ne peut donc pas être affichée...";
  • var browser = (document.all || document.layers) ? true : alert(lecture);
  • }
  • browser_check()
  • </script>
  • <script>
  • var pic = "bandic.jpg";
  • var mask = '<IMG SRC="' + pic + '">';
  • var fancy, stake, level, winner;
  • var total = 20000;
  • var running = 0;
  • var stopped = 1;
  • var odds = new Array();
  • var step = new Array();
  • var band='<TABLE BORDER=1 BORDERCOLOR=#000000 WIDTH=600 HEIGHT=300 ALIGN=CENTER CELLPADDING=0 CELLSPACING=0><FORM NAME=f><TR>';
  • band += '<TD COLSPAN=4 BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=msg SIZE=24></TD></TR><TR>';
  • band += '<TD BGCOLOR=#FF0000 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=box0 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=red onclick="choose_fancy(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#00FF00 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=box1 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=green onclick="choose_fancy(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#0000FF ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=box2 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=blue onclick="choose_fancy(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#FFF000 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=box3 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=yellow onclick="choose_fancy(this.form,this.value);"></TD></TR><TR>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 1000 " onclick="choose_stake(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 2000 " onclick="choose_stake(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 3000 " onclick="choose_stake(this.form,this.value);"></TD>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 4000 " onclick="choose_stake(this.form,this.value);"></TD></TR><TR>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON NAME=next VALUE=Reset onclick="init();"></TD>';
  • band += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT NAME=wlt TYPE=TEXT SIZE=5 VALUE='+total+' onfocus="blur(this)"></TD>';
  • band += '<TD COLSPAN=2 BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON NAME=go VALUE=" Commencer " onclick="lets_go(this.form);"></TD></TR></FORM></TABLE>';
  • if(document.all)
  • {
  • var content=('<DIV ID=trak STYLE="position:absolute;top:20;left:20;width:400;height:400;background:#000000"></DIV>');
  • content += ('<DIV ID=line STYLE="position:absolute;top:20;left:287;width:1;height:100;background:#FFFFFF"></DIV>');
  • content += ('<DIV ID=book STYLE="position:absolute;top:120;left:20;width:300;height:160;background:#C0C0C0">'+band+'</DIV>');
  • content += ('<DIV ID=redc STYLE="position:absolute;top:23;left:20;width:31;height:22;background:#FF0000">'+mask+'</DIV>');
  • content += ('<DIV ID=grnc STYLE="position:absolute;top:47;left:20;width:31;height:22;background:#00FF00">'+mask+'</DIV>');
  • content += ('<DIV ID=bluc STYLE="position:absolute;top:71;left:20;width:31;height:22;background:#0000FF">'+mask+'</DIV>');
  • content += ('<DIV ID=yelc STYLE="position:absolute;top:96;left:20;width:31;height:22;background:#FFF000">'+mask+'</DIV>');
  • }
  • else if (document.layers)
  • {
  • var content=('<LAYER ID=trak top=20 left=20 width=400 height=300 bgColor=#000000></LAYER>');
  • content += ('<LAYER ID=line top=20 left=287 width=1 height=100 bgColor=#FFFFFF></LAYER>');
  • content += ('<LAYER ID=book top=120 left=20 width=300 height=160 bgColor=#C0C0C0>'+band+'</LAYER>');
  • content += ('<LAYER ID=redc top=23 left=20 width=31 height=22 bgColor=#FF0000>'+mask+'</LAYER>');
  • content += ('<LAYER ID=grnc top=47 left=20 width=31 height=22 bgColor=#00FF00>'+mask+'</LAYER>');
  • content += ('<LAYER ID=bluc top=71 left=20 width=31 height=22 bgColor=#0000FF>'+mask+'</LAYER>');
  • content += ('<LAYER ID=yelc top=96 left=20 width=31 height=22 bgColor=#FFF000>'+mask+'</LAYER>');
  • }
  • document.write(content);
  • init();
  • function init()
  • {
  • if(!running)
  • {
  • fancy="";
  • stake="";
  • level="";
  • stopped = 0;
  • for(i=0; i<4; i++)
  • {
  • odds[i] = Math.round(Math.random() * 3)+1;
  • step[i] = eval(10 - odds[i]);
  • odds[i] +="/1";
  • }
  • if(document.all)
  • {
  • document.all.msg.value = " .:: Crash Racing ::."
  • document.all.box0.value = odds[0];
  • document.all.box1.value = odds[1];
  • document.all.box2.value = odds[2];
  • document.all.box3.value = odds[3];
  • for(i=0; i<4; i++)
  • {
  • document.all.back[i].checked=0;
  • }
  • document.all.redc.style.left=20;
  • document.all.grnc.style.left=20;
  • document.all.bluc.style.left=20;
  • document.all.yelc.style.left=20;
  • }
  • if(document.layers)
  • {
  • with(document.book)
  • {
  • document.f.msg.value = ".:: Crash Racing ::."
  • document.f.box0.value = odds[0];
  • document.f.box1.value = odds[1];
  • document.f.box2.value = odds[2];
  • document.f.box3.value = odds[3];
  • for(i=0; i<4; i++)
  • {
  • document.f.back[i].checked=0;
  • }}
  • document.redc.left = 20;
  • document.grnc.left = 20;
  • document.bluc.left = 20;
  • document.yelc.left = 20;
  • }}}
  • function choose_fancy(f,color)
  • {
  • if(!running)
  • {
  • switch(color)
  • {
  • case "red" : level=odds[0]; break;
  • case "green" : level=odds[1]; break;
  • case "blue" : level=odds[2]; break;
  • case "yellow" : level=odds[3]; break;
  • }
  • fancy = color;
  • if(stake != "") f.msg.value="Pari : "+fancy+" "+stake+" ("+level+")";
  • else f.msg.value= "Vous avez choisi "+fancy;
  • }}
  • function choose_stake(f,amount)
  • {
  • if(!running)
  • {
  • stake = amount;
  • if(fancy != "") f.msg.value="Pari : "+fancy+" "+stake+" ("+level+")";
  • else f.msg.value = "Mise "+stake;
  • }}
  • function lets_go(f)
  • {
  • if(!running && stopped) init();
  • if(!running && !stopped)
  • {
  • if(stake > parseInt(f.wlt.value)) f.msg.value="Vous n'avez pas l'argent néccesaires !";
  • else
  • if(fancy == "") f.msg.value="Choisissez une couleur";
  • else
  • if(stake == "") f.msg.value="Choisissez un montant";
  • else
  • {
  • running = 1;
  • run_race();
  • }}}
  • function run_race()
  • {
  • var n = Math.floor(Math.random() * 4);
  • if(document.all)
  • {
  • switch(n)
  • {
  • case 0 : document.all.redc.style.left = parseInt(document.all.redc.style.left)+step[0];
  • if(parseInt(document.all.redc.style.left) >= 288)
  • {
  • document.all.redc.style.left = 288;
  • winner = "red";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 1 : document.all.grnc.style.left = parseInt(document.all.grnc.style.left)+step[1];
  • if(parseInt(document.all.grnc.style.left) >= 288)
  • {
  • document.all.grnc.style.left = 288;
  • winner = "green";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 2 : document.all.bluc.style.left = parseInt(document.all.bluc.style.left)+step[2];
  • if(parseInt(document.all.bluc.style.left) >= 288)
  • {
  • document.all.bluc.style.left = 288;
  • winner = "blue";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 3 : document.all.yelc.style.left = parseInt(document.all.yelc.style.left)+step[3];
  • if(parseInt(document.all.yelc.style.left) >= 288)
  • {
  • document.all.yelc.style.left = 288;
  • winner = "yellow";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • }}
  • if(document.layers)
  • {
  • switch(n)
  • {
  • case 0 : document.redc.left += step[0];
  • if(document.redc.left >= 288)
  • {
  • document.redc.left = 288;
  • winner = "red";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 1 : document.grnc.left += step[1];
  • if(document.grnc.left >= 288)
  • {
  • document.grnc.left = 288;
  • winner = "green";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 2 : document.bluc.left += step[2];
  • if(document.bluc.left >= 288)
  • {
  • document.bluc.left = 288;
  • winner = "blue";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • case 3 : document.yelc.left += step[3];
  • if(document.yelc.left >= 288)
  • {
  • document.yelc.left = 288;
  • winner = "yellow";
  • running = 0;
  • stopped = 1;
  • }
  • break;
  • }}
  • if(running) window.setTimeout("run_race()", 100);
  • else
  • results();
  • }
  • function results()
  • {
  • if(document.all)
  • {
  • if(winner == fancy)
  • {
  • var winnings = parseInt(stake) * parseInt(level.charAt(0));
  • document.f.msg.value = winner+" a gagné : + "+winnings;
  • total += winnings;
  • document.f.wlt.value = total;
  • }
  • else
  • {
  • document.f.msg.value = winner+" a gagné : - "+stake;
  • total -= parseInt(stake);
  • document.f.wlt.value = total;
  • }
  • if(parseInt(document.f.wlt.value) == 0) var refill = confirm("Perdu ! Jouer à nouveau ? ");
  • if(refill)
  • {
  • total = 10000;
  • document.f.wlt.value = total;
  • init();
  • }}
  • if(document.layers)
  • {
  • with(document.book)
  • {
  • if(winner == fancy)
  • {
  • var winnings = parseInt(stake) * parseInt(level.charAt(0));
  • document.f.msg.value = winner+" a gagné : + "+winnings;
  • total += winnings;
  • document.f.wlt.value = total;
  • }
  • else
  • {
  • document.f.msg.value = winner+" a gagné : - "+stake;
  • total -= parseInt(stake);
  • document.f.wlt.value = total;
  • }
  • if(parseInt(document.f.wlt.value) == 0) var refill = confirm("Domage tu peux rejouer ? ");
  • if(refill)
  • {
  • total = 10000;
  • document.f.wlt.value = total;
  • init();
  • }}}}
  • </script>
  • </head>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <br>
  • <b>Régle du jeu :</b><br>
  • Voici un jeu de racing !<br>
  • 1. choisir sa couleur :<br>
  • placer votre curseur dans le rond de votre couleur !<br>
  • 2. donner un prix <br>
  • Simple cliquez sur le bouton de votre mise (1000 a 4000)<br>
  • 3. Quel joueur êtes vous ???<br>
  • Si vous avez pris la couleur rouge (red) : vous êtes le premier<br>
  • Si vous avez pris la couleur verte (green) : vous êtes le deuxieme<br>
  • Si vous avez pris la couleur bleu (blue) : vous êtes le troisieme<br>
  • Si vous avez pris la couleur jaune (Yellow) : vous êtes le quatrieme<br>
  • 4. Le bouton Reset<br>
  • Il permet de recommencer tout le jeu !!!<br>
  • 5. Jouer<br>
  • Cliquez sur le bouton : Commencer <br>
  • <hr>
<bgsound src="racing.mid" loop="1000">
<body bgcolor="#000000" text="#FFFFFF" link="#00FF00">
<head>
<SCRIPT>
function browser_check() {
var lecture = "Votre navigateur ne supporte pas le DHTML\n"
+"- cette page ne peut donc pas être affichée...";
var browser = (document.all || document.layers) ? true : alert(lecture);
}
browser_check()
</script>
<script>
var pic = "bandic.jpg";
var mask = '<IMG SRC="' + pic + '">';
var fancy, stake, level, winner;
var total = 20000;
var running = 0;
var stopped = 1;
var odds  = new Array();
var step  = new Array();
var band='<TABLE BORDER=1 BORDERCOLOR=#000000 WIDTH=600 HEIGHT=300 ALIGN=CENTER CELLPADDING=0 CELLSPACING=0><FORM NAME=f><TR>';
band  += '<TD COLSPAN=4 BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT NAME=msg SIZE=24></TD></TR><TR>';
band  += '<TD BGCOLOR=#FF0000 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT  NAME=box0 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=red onclick="choose_fancy(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#00FF00 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT  NAME=box1 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=green onclick="choose_fancy(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#0000FF ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT  NAME=box2 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=blue onclick="choose_fancy(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#FFF000 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=TEXT  NAME=box3 SIZE=3 onfocus="blur(this)"><BR><INPUT TYPE=RADIO NAME=back VALUE=yellow onclick="choose_fancy(this.form,this.value);"></TD></TR><TR>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 1000 " onclick="choose_stake(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 2000 " onclick="choose_stake(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 3000 " onclick="choose_stake(this.form,this.value);"></TD>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON VALUE=" 4000 " onclick="choose_stake(this.form,this.value);"></TD></TR><TR>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON NAME=next VALUE=Reset onclick="init();"></TD>';
band  += '<TD BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT NAME=wlt TYPE=TEXT SIZE=5 VALUE='+total+' onfocus="blur(this)"></TD>';
band  += '<TD COLSPAN=2 BGCOLOR=#C0C0C0 ALIGN=CENTER VALIGN=MIDDLE><INPUT TYPE=BUTTON NAME=go VALUE=" Commencer " onclick="lets_go(this.form);"></TD></TR></FORM></TABLE>';
if(document.all)
{
var content=('<DIV ID=trak STYLE="position:absolute;top:20;left:20;width:400;height:400;background:#000000"></DIV>');
content  += ('<DIV ID=line STYLE="position:absolute;top:20;left:287;width:1;height:100;background:#FFFFFF"></DIV>');
content  += ('<DIV ID=book STYLE="position:absolute;top:120;left:20;width:300;height:160;background:#C0C0C0">'+band+'</DIV>');
content  += ('<DIV ID=redc STYLE="position:absolute;top:23;left:20;width:31;height:22;background:#FF0000">'+mask+'</DIV>');
content  += ('<DIV ID=grnc STYLE="position:absolute;top:47;left:20;width:31;height:22;background:#00FF00">'+mask+'</DIV>');
content  += ('<DIV ID=bluc STYLE="position:absolute;top:71;left:20;width:31;height:22;background:#0000FF">'+mask+'</DIV>');
content  += ('<DIV ID=yelc STYLE="position:absolute;top:96;left:20;width:31;height:22;background:#FFF000">'+mask+'</DIV>');
}
else if (document.layers)
{
var content=('<LAYER ID=trak top=20 left=20 width=400 height=300 bgColor=#000000></LAYER>');
content  += ('<LAYER ID=line top=20 left=287 width=1 height=100 bgColor=#FFFFFF></LAYER>');
content  += ('<LAYER ID=book top=120 left=20 width=300 height=160 bgColor=#C0C0C0>'+band+'</LAYER>');
content  += ('<LAYER ID=redc top=23 left=20 width=31 height=22 bgColor=#FF0000>'+mask+'</LAYER>');
content  += ('<LAYER ID=grnc top=47 left=20 width=31 height=22 bgColor=#00FF00>'+mask+'</LAYER>');
content  += ('<LAYER ID=bluc top=71 left=20 width=31 height=22 bgColor=#0000FF>'+mask+'</LAYER>');
content  += ('<LAYER ID=yelc top=96 left=20 width=31 height=22 bgColor=#FFF000>'+mask+'</LAYER>');
}
document.write(content);
init();
function init()
{
if(!running)
{
fancy="";
stake="";
level="";
stopped = 0;
for(i=0; i<4; i++)
{
odds[i] = Math.round(Math.random() * 3)+1;
step[i] = eval(10 - odds[i]);
odds[i] +="/1";
}
if(document.all)
{
document.all.msg.value  = "     .:: Crash Racing ::."
document.all.box0.value = odds[0];
document.all.box1.value = odds[1];
document.all.box2.value = odds[2];
document.all.box3.value = odds[3];
for(i=0; i<4; i++)
{
document.all.back[i].checked=0;
}
document.all.redc.style.left=20;
document.all.grnc.style.left=20;
document.all.bluc.style.left=20;
document.all.yelc.style.left=20;
}
if(document.layers)
{
with(document.book)
{
document.f.msg.value  = ".:: Crash Racing ::."
document.f.box0.value = odds[0];
document.f.box1.value = odds[1];
document.f.box2.value = odds[2];
document.f.box3.value = odds[3];
for(i=0; i<4; i++)
{
document.f.back[i].checked=0;
}}
document.redc.left = 20;
document.grnc.left = 20;
document.bluc.left = 20;
document.yelc.left = 20;
}}}
function choose_fancy(f,color)
{
if(!running)
{
switch(color)
{
case "red"    : level=odds[0]; break;
case "green"  : level=odds[1]; break;
case "blue"   : level=odds[2]; break;
case "yellow" : level=odds[3]; break;
}
fancy = color;
if(stake != "") f.msg.value="Pari : "+fancy+" "+stake+" ("+level+")";
else f.msg.value= "Vous avez choisi "+fancy;
}}
function choose_stake(f,amount)
{
if(!running)
{
stake = amount;
if(fancy != "") f.msg.value="Pari : "+fancy+" "+stake+" ("+level+")";
else f.msg.value = "Mise "+stake;
}}
function lets_go(f)
{
if(!running && stopped) init();
if(!running && !stopped)
{
if(stake > parseInt(f.wlt.value)) f.msg.value="Vous n'avez pas l'argent néccesaires !";
else
if(fancy == "") f.msg.value="Choisissez une couleur";
else
if(stake == "") f.msg.value="Choisissez un montant";
else
{
running = 1;
run_race();
}}}
function run_race()
{
var n = Math.floor(Math.random() * 4);
if(document.all)
{
switch(n)
{
case 0 : document.all.redc.style.left = parseInt(document.all.redc.style.left)+step[0];
if(parseInt(document.all.redc.style.left) >= 288)
{
document.all.redc.style.left = 288;
winner = "red";
running = 0;
stopped = 1;
}
break;
case 1 : document.all.grnc.style.left = parseInt(document.all.grnc.style.left)+step[1];
if(parseInt(document.all.grnc.style.left) >= 288)
{
document.all.grnc.style.left = 288;
winner = "green";
running = 0;
stopped = 1;
}
break;
case 2 : document.all.bluc.style.left = parseInt(document.all.bluc.style.left)+step[2];
if(parseInt(document.all.bluc.style.left) >= 288)
{
document.all.bluc.style.left = 288;
winner = "blue";
running = 0;
stopped = 1;
}
break;
case 3 : document.all.yelc.style.left = parseInt(document.all.yelc.style.left)+step[3];
if(parseInt(document.all.yelc.style.left) >= 288)
{
document.all.yelc.style.left = 288;
winner = "yellow";
running = 0;
stopped = 1;
}
break;
}}
if(document.layers)
{
switch(n)
{
case 0 : document.redc.left += step[0];
if(document.redc.left >= 288)
{
document.redc.left = 288;
winner = "red";
running = 0;
stopped = 1;
}
break;
case 1 : document.grnc.left += step[1];
if(document.grnc.left >= 288)
{
document.grnc.left = 288;
winner = "green";
running = 0;
stopped = 1;
}
break;
case 2 : document.bluc.left += step[2];
if(document.bluc.left >= 288)
{
document.bluc.left = 288;
winner = "blue";
running = 0;
stopped = 1;
}
break;
case 3 : document.yelc.left += step[3];
if(document.yelc.left >= 288)
{
document.yelc.left = 288;
winner = "yellow";
running = 0;
stopped = 1;
}
break;
}}
if(running) window.setTimeout("run_race()", 100);
else
results();
}
function results()
{
if(document.all)
{
if(winner == fancy)
{
var winnings = parseInt(stake) * parseInt(level.charAt(0));
document.f.msg.value = winner+" a gagné : + "+winnings;
total += winnings;
document.f.wlt.value = total;
}
else
{
document.f.msg.value = winner+" a gagné : - "+stake;
total -= parseInt(stake);
document.f.wlt.value = total;
}
if(parseInt(document.f.wlt.value) == 0) var refill = confirm("Perdu ! Jouer à nouveau ? ");
if(refill)
{
total = 10000;
document.f.wlt.value = total;
init();
}}
if(document.layers)
{
with(document.book)
{
if(winner == fancy)
{
var winnings = parseInt(stake) * parseInt(level.charAt(0));
document.f.msg.value = winner+" a gagné : + "+winnings;
total += winnings;
document.f.wlt.value = total;
}
else
{
document.f.msg.value = winner+" a gagné : - "+stake;
total -= parseInt(stake);
document.f.wlt.value = total;
}
if(parseInt(document.f.wlt.value) == 0) var refill = confirm("Domage tu peux rejouer ? ");
if(refill)
{
total = 10000;
document.f.wlt.value = total;
init();
}}}}
</script>
</head>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<b>Régle du jeu :</b><br>
Voici un jeu de racing !<br>
1. choisir sa couleur :<br>
placer votre curseur dans le rond de votre couleur !<br>
2. donner un prix <br>
Simple cliquez sur le bouton de votre mise (1000 a 4000)<br>
3. Quel joueur êtes vous ???<br>
Si vous avez pris la couleur rouge (red) : vous êtes le premier<br>
Si vous avez pris la couleur verte (green) : vous êtes le deuxieme<br>
Si vous avez pris la couleur bleu (blue) : vous êtes le troisieme<br>
Si vous avez pris la couleur jaune (Yellow) : vous êtes le quatrieme<br>
4. Le bouton Reset<br>
Il permet de recommencer tout le jeu !!!<br>
5. Jouer<br>
Cliquez sur le bouton : Commencer <br>
<hr>

Conclusion

Voila j'espere que vous aurez aimer !
 

Fichier Zip

Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
  • bandic.JPGTélécharger ce fichier [Réservé aux membres club]Voir ce fichier2 129 octets
  • racing.midTélécharger ce fichier [Réservé aux membres club]15 156 octets

Télécharger le zip

Commentaires et avis

signaler à un administrateur
Commentaire de Sibelle07 le 16/12/2003 21:43:04

Pour ceux que sa interrese il y a moyen de choper un genre de type de cette source en visual basic 6 &gt;&gt;&gt; a l'adresse suivante : http://www.vbfrance.com/code.aspx?ID=18752

signaler à un administrateur
Commentaire de leris le 17/12/2003 06:38:28

ok , donc si je comprends bien , on commence par le "background" , puis la balise body , la balise head ,et ensuite les scripts .
on ferme les scripts et la balise head et le tour est joué ...

génial , plus de balise "html" et balises head et body placées n'importe où !

tres fort ! essaies de te faire embaucher par le w3c ! peut etre qu'ils en prennent des comme toi !!!

signaler à un administrateur
Commentaire de ShadowMaster le 17/12/2003 07:19:43

et ho doucement, il a pas 25 ans!

signaler à un administrateur
Commentaire de Sibelle07 le 17/12/2003 09:00:19

Même le but est a ce que le javascript marche !
si tu veux aboslument que je place d'acord mais il y aura rien de plus !

signaler à un administrateur
Commentaire de tit1012 le 17/12/2003 15:37:45

admirable, mais kan je voi pas les 5 premiere ligne des regle parce ke
elle sont pass assez basse si tout sinon super

signaler à un administrateur
Commentaire de arthur35 le 12/05/2004 21:18:16

voila j'ai mi tous la source, mais je ne voi que la règle du jeu en bas et plus haut il n'y a que des espaces et pas de bouton commencer !!!
Pourquoi?

signaler à un administrateur
Commentaire de arthur35 le 12/05/2004 21:23:08

voila j'ai mi tous la source, mais je ne voi que la règle du jeu en bas et plus haut il n'y a que des espaces et pas de bouton commencer !!!
Pourquoi?

signaler à un administrateur
Commentaire de WindPowa le 16/05/2004 17:19:31

Oui c'est très bien mais tous les joueurs ont la même image... "RED, "GREEN', "BLUE", et "YELLOW" n'ont donc pas de sens...

signaler à un administrateur
Commentaire de coucou747 le 11/08/2004 20:34:22

belle façon de coder...
une entête dans un corp de page oui pourquois pas disons que c'est moderne...
bon, j'éspère n'avoir aucune page codé de cette façon sur mon site...

Nan franchement c'est domage de faire un bon truc en javascript et de le gacher par ces "oublis"

signaler à un administrateur
Commentaire de Choumoumou le 08/10/2004 16:00:26

Ouai, pas mal ! c'est cool ces petites voitures ! mais tu aurai du mettre des images différentes pour chaques joueurs...
enfun c'est pas grave.
mais j'adooor ton tuc !!
continue comme ça !

signaler à un administrateur
Commentaire de stfou le 21/05/2006 14:42:03

dommage :

http://www.javascriptfr.com/codes/JEU-CRASH-BANDICOOT-RACING-MODIFIE-MOI_22873.aspx

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Juillet 2009
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
2728293031  

Consulter la suite du CalendriCode

Comparez les prix Nouvelle version

Photothèque Nouveau !



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,499 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.