I'm using setInterval to animate an array of weather images. The code works, but in FF, sometimes the event fires too soon, giving the impression that images are missed, while in IE, the script works fine. I think that I'm doing something wrong, but I have the impression (but maybe false) that it worked fine in FF up until a few updates ago. Is this a FF bug? The basic code is this:
One working example is at: http://air.ccny.cuny.edu/ws/geon/ani...ani0&channel=4
Code:
var interval_id = window.setInterval("next_frame()",interval_delay); function next_frame() { document.images["image_holder"].src = image_array[frame_number].src; document.getElementById("date_holder").innerHTML = date_array[frame_number]; if (fish) { frame_number++; if (frame_number == image_array.length) { if (hold > 1) { hold--; frame_number--; } else { if (cycle == 0) { hold = pole; } frame_number = 0; } } } }
Comment