Re: MNG?

by Melanie Gann <mgann(at)>

 Date:  Tue, 05 Mar 2002 13:18:00 -0500
 To:  Adrian Harris <adrian(at)>,
 References:  SOWINSO
  todo: View Thread, Original
Below is a javascript that allows you to rotate through images. I use this
rather than animated gif when I must use jpegs.

Hope it  helps.
<!-- Original:  Robert Bui (astrogate(at) -->
<!-- Web Site: -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->

<!-- Begin
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 500;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/hollyongrassS.jpg");
image_list[image_index++] = new imageItem("images/hollyprettyS.jpg");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
function get_ImageItemLocation(imageObj) {
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
else {
image_index = (image_index+1) % number_of_image;
var new_image = get_ImageItemLocation(image_list[image_index]);
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
//  End -->
At 04:01 PM 3/5/02 +0000, Adrian Harris wrote:
>a client has a  logo with a gently shading colors area included. It looks a
>mess in GIF as the shading forms in to bands. A JPEG looks fine, but they
>would really like to animate part of it. The section they want animate
>works OK as a GIF, so I could slice that off, animate it and put it into a
>layer over the JPEG. But in my experience (not extensive) layers move
>around in different browsers, so I'm not too keen on this plan!
>Flash is an option (I think), but one I'm trying to avoid as the whole
>plug-in issue comes up. Maybe I'm being a bit prejudiced about Flash?
>The coming soon MNG format is the answer to my needs, but who supports it?
>The Applications with MNG Support page I found
>( only lists Mozilla and NN
>versions 6.0 and 6.01.
>I'm about to tell the client it can't be done reliably at the moment, but
>thought I'd run this one past you guys!
>Best wishe,
>Adrian Harris M.A.
>Member of the HTML Writers Guild
>GreenNet Design: World Class Web design that won't cost the Earth

Second Street Web Design

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA