Skip to content

Commit

Permalink
more animation: update of network image every 10 seconds
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6940 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Jun 23, 2010
1 parent 2b4f8f6 commit 8e3cbbb
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions htroot/Network.html
Expand Up @@ -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>
Expand Down

0 comments on commit 8e3cbbb

Please sign in to comment.