more animation: update of network image every 10 seconds

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6940 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 2b4f8f6c06
commit 8e3cbbb6a9

@ -10,19 +10,29 @@
</style>
<script type="text/javascript">
imgname = "NetworkPicture.png?width=768&height=576&bgcolor=FFFFFF&coronaangle=";
i = 0;
imagestub = "NetworkPicture.png?width=768&height=576&bgcolor=FFFFFF&coronaangle=";
imageindex = 0;
imagecycles = 0;
imagearray = new Array(4);
for (j = 0; j < 4; j++) {
imagearray[j] = new Image(768, 576);
angle = j * 90;
imagearray[j].src = imgname + angle;
}
setTimeout("initanimation()", 100);
setTimeout("doanimation()", 1000);
function initanimation() {
for (j = 0; j < 4; j++) {
imagearray[j] = new Image(768, 576);
angle = j * 90;
time = new Date().getTime();
imagearray[j].src = imagestub + angle + "&time=" + time;
}
}
function doanimation() {
document.getElementById("NetworkPicture").src = imagearray[i].src;
i++;
if (i == 4) { i = 0; }
document.getElementById("NetworkPicture").src = imagearray[imageindex].src;
imageindex++;
if (imageindex == 4) { imageindex = 0; }
imagecycles++;
if (imagecycles == 100) {
initanimation();
imagecycles = 0;
}
setTimeout("doanimation()", 100);
}
</script>

Loading…
Cancel
Save