G
Guest
Gast
Hallo
Ich versuche zum ersten Mal mittels Java eine PhotoCD mit Slideshow zu generieren und kommt nicht mehr weiter. Ich habe folgende Probleme:
1) Darstellen von zwei unterschiedlichen Formaten mittels Switch - case Fall
2) Geschwindigkeit (54 Fotos so à ein Mega...) <- ist aber nicht sooo wichtig
Ich versuche zum ersten Mal mittels Java eine PhotoCD mit Slideshow zu generieren und kommt nicht mehr weiter. Ich habe folgende Probleme:
1) Darstellen von zwei unterschiedlichen Formaten mittels Switch - case Fall
2) Geschwindigkeit (54 Fotos so à ein Mega...) <- ist aber nicht sooo wichtig
Code:
<html>
<head>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel=stylesheet type="text/css" href="style.css">
<title>Slideshow</title>
<SCRIPT language="JavaScript">
<!--
/* define image width and height */
/* define image urls */
if (document.images)
{
pic1= new Image;
pic1.src="01.jpg";
pic2= new Image;
pic2.src="02.jpg";
pic3= new Image;
pic3.src="03.jpg";
pic4= new Image;
pic4.src="04.jpg";
pic5= new Image;
pic5.src="05.jpg";
pic6= new Image;
pic6.src="06.jpg";
pic7= new Image;
pic7.src="07.jpg";
pic8= new Image;
pic8.src="08.jpg";
pic9= new Image;
pic9.src="09.jpg";
pic10= new Image;
pic10.src="10.jpg";
pic11= new Image;
pic11.src="11.jpg";
pic12= new Image;
pic12.src="12.jpg";
pic13= new Image;
pic13.src="13.jpg";
pic14= new Image;
pic14.src="14.jpg";
pic15= new Image;
pic15.src="15.jpg";
pic16= new Image;
pic16.src="16.jpg";
pic17= new Image;
pic17.src="17.jpg";
pic18= new Image;
pic18.src="18.jpg";
pic19= new Image;
pic19.src="19.jpg";
pic20= new Image;
pic20.src="20.jpg";
pic21= new Image;
pic21.src="21.jpg";
pic22= new Image;
pic22.src="22.jpg";
pic23= new Image;
pic23.src="23.jpg";
pic24= new Image;
pic24.src="24.jpg";
pic25= new Image;
pic25.src="25.jpg";
pic26= new Image;
pic26.src="26.jpg";
pic27= new Image;
pic27.src="27.jpg";
pic28= new Image;
pic28.src="28.jpg";
pic29= new Image;
pic29.src="29.jpg";
pic30= new Image;
pic30.src="30.jpg";
pic31= new Image;
pic31.src="31.jpg";
pic32= new Image;
pic32.src="32.jpg";
pic33= new Image;
pic33.src="33.jpg";
pic34= new Image;
pic34.src="34.jpg";
pic35= new Image;
pic35.src="35.jpg";
pic36= new Image;
pic36.src="36.jpg";
pic37= new Image;
pic37.src="37.jpg";
pic38= new Image;
pic38.src="38.jpg";
pic39= new Image;
pic39.src="39.jpg";
pic40= new Image;
pic40.src="40.jpg";
pic41= new Image;
pic41.src="41.jpg";
pic42= new Image;
pic42.src="42.jpg";
pic43= new Image;
pic43.src="43.jpg";
pic44= new Image;
pic44.src="44.jpg";
pic45= new Image;
pic45.src="45.jpg";
pic46= new Image;
pic46.src="46.jpg";
pic47= new Image;
pic47.src="47.jpg";
pic48= new Image;
pic48.src="48.jpg";
pic49= new Image;
pic49.src="49.jpg";
pic50= new Image;
pic50.src="50.jpg";
pic51= new Image;
pic51.src="51.jpg";
pic52= new Image;
pic52.src="52.jpg";
pic53= new Image;
pic53.src="53.jpg";
pic54= new Image;
pic54.src="54.jpg";
}
var pics= new Array(54)
pics[0]=pic1.src;
pics[1]=pic2.src;
pics[2]=pic3.src;
pics[3]=pic4.src;
pics[4]=pic5.src;
pics[5]=pic6.src;
pics[6]=pic7.src;
pics[7]=pic8.src;
pics[8]=pic9.src;
pics[9]=pic10.src;
pics[10]=pic11.src;
pics[11]=pic12.src;
pics[12]=pic13.src;
pics[13]=pic14.src;
pics[14]=pic15.src;
pics[15]=pic16.src;
pics[16]=pic17.src;
pics[17]=pic18.src;
pics[18]=pic19.src;
pics[19]=pic20.src;
pics[20]=pic21.src;
pics[21]=pic22.src;
pics[22]=pic23.src;
pics[23]=pic24.src;
pics[24]=pic25.src;
pics[25]=pic26.src;
pics[26]=pic27.src;
pics[27]=pic28.src;
pics[28]=pic29.src;
pics[29]=pic30.src;
pics[30]=pic31.src;
pics[31]=pic32.src;
pics[32]=pic33.src;
pics[33]=pic34.src;
pics[34]=pic35.src;
pics[35]=pic36.src;
pics[36]=pic37.src;
pics[37]=pic38.src;
pics[38]=pic39.src;
pics[39]=pic40.src;
pics[40]=pic41.src;
pics[41]=pic42.src;
pics[42]=pic43.src;
pics[43]=pic44.src;
pics[44]=pic45.src;
pics[45]=pic46.src;
pics[46]=pic47.src;
pics[47]=pic48.src;
pics[48]=pic49.src;
pics[49]=pic50.src;
pics[50]=pic51.src;
pics[51]=pic52.src;
pics[52]=pic53.src;
pics[53]=pic54.src;
var numpics=2;
var thenum=0;
imgName="img1";
function change_it()
{
if (document.images)
{ switch (thenum) {
case "0":
// case "10":
// case "12":
// case "13":
// case "17":
document.write("[img]"+pics[thenum]+"[/img]\n");
break;
default:
document.write("[img]"+pics[thenum]+"[/img]\n");
break;
}
setTimeout('change_it2()',8000); }
}
function change_it2()
{
var x=0;
thenum+=1;
document[imgName].src=pics[thenum];
x+=1;
setTimeout('change_it2()',8000);
}
//-->
</SCRIPT>
</head>
<body>
<div class="image">
<table border="1" align="center">
<tr>
<td>
<SCRIPT language="JavaScript">
<!--
change_it()
//-->
</SCRIPT>
</td>
</tr>
</table>
</div>
</body>
</html>