Rotating graphics

G

Guest

I am trying to make graphics rotate, such as in a banner ad. The following code works when I preview it on my computer, but will not work on the web site. I sure will appreciate getting pointed in the right direction

<html><head><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Rotating Graphics</title><SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"><!-- Hide script from old browser

adImages = new Array("banners/image1.gif","banners/image2.gif","banners/image3.gif")
thisAd = 0
imgCt = adImages.length

function rotate()
if (document.images)
thisAd++
if (thisAd == imgCt)
thisAd = 0

document.adBanner.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)



// End hiding script from old browsers --></SCRIPT><meta name="Microsoft Theme" content="fixmedicare 1011, default"><meta name="Microsoft Border" content="tb, default"></head><body onLoad="rotate()"><IMG SRC="banners/image1.gif" WIDTH="400" HEIGHT="75" NAME="adBanner" ALT="Ad Banner">&nbsp;</body></html>
 
C

Crash Gordon

I'm no guru on this, but are the paths to the images correct?




| I am trying to make graphics rotate, such as in a banner ad. The following code works when I preview it on my computer, but will not work on the web site. I sure will appreciate getting pointed in the right direction.
|
| <html><head><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Rotating Graphics</title><SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"><!-- Hide script from old browsers
|
| adImages = new Array("banners/image1.gif","banners/image2.gif","banners/image3.gif");
| thisAd = 0;
| imgCt = adImages.length;
|
| function rotate() {
| if (document.images) {
| thisAd++;
| if (thisAd == imgCt) {
| thisAd = 0;
| }
| document.adBanner.src=adImages[thisAd];
| setTimeout("rotate()", 3 * 1000);
| }
| }
|
| // End hiding script from old browsers --></SCRIPT><meta name="Microsoft Theme" content="fixmedicare 1011, default"><meta name="Microsoft Border" content="tb, default"></head><body onLoad="rotate()"><IMG SRC="banners/image1.gif" WIDTH="400" HEIGHT="75" NAME="adBanner" ALT="Ad Banner">&nbsp;</body></html>
 
S

Stephen T. Fox

Me, too. Not a guru, that is. But, that said, I think that I would probably
take my image into Image composer, make a copy for each position I needed in
the rotation, then make an animated gif with the included gif animator. I
think that would probably be simpler. I'd like to know if you try it.

Stephen

John said:
I am trying to make graphics rotate, such as in a banner ad. The
following code works when I preview it on my computer, but will not work on
the web site. I sure will appreciate getting pointed in the right
direction.
<html><head><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta
name="ProgId" content="FrontPage.Editor.Document"><meta
http-equiv="Content-Type" content="text/html;
charset=windows-1252"><title>Rotating Graphics</title><SCRIPT
LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"><!-- Hide script from old
browsers
adImages = new Array("banners/image1.gif","banners/image2.gif","banners/image3.gif");
thisAd = 0;
imgCt = adImages.length;

function rotate() {
if (document.images) {
thisAd++;
if (thisAd == imgCt) {
thisAd = 0;
}
document.adBanner.src=adImages[thisAd];
setTimeout("rotate()", 3 * 1000);
}
}

// End hiding script from old browsers --></SCRIPT><meta name="Microsoft
Theme" content="fixmedicare 1011, default"><meta name="Microsoft Border"
content="tb, default"></head><body onLoad="rotate()"><IMG
SRC="banners/image1.gif" WIDTH="400" HEIGHT="75" NAME="adBanner" ALT="Ad
Banner">&nbsp;</body></html>
 
S

Stephen T. Fox

As an alternative to javascripts, you can take the image into Image
Composer, copy and rotate making as many images as you think makes smooth
rotation, then plug them into the gif animator. All that is required is to
put that image on your page. See example:
http://home1.gte.net/res04j39/test1.html . I make the Linux TUX just to try
it out.

Stephen Fox

John said:
I am trying to make graphics rotate, such as in a banner ad. The
following code works when I preview it on my computer, but will not work on
the web site. I sure will appreciate getting pointed in the right
direction.
<html><head><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta
name="ProgId" content="FrontPage.Editor.Document"><meta
http-equiv="Content-Type" content="text/html;
charset=windows-1252"><title>Rotating Graphics</title><SCRIPT
LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"><!-- Hide script from old
browsers
adImages = new Array("banners/image1.gif","banners/image2.gif","banners/image3.gif");
thisAd = 0;
imgCt = adImages.length;

function rotate() {
if (document.images) {
thisAd++;
if (thisAd == imgCt) {
thisAd = 0;
}
document.adBanner.src=adImages[thisAd];
setTimeout("rotate()", 3 * 1000);
}
}

// End hiding script from old browsers --></SCRIPT><meta name="Microsoft
Theme" content="fixmedicare 1011, default"><meta name="Microsoft Border"
content="tb, default"></head><body onLoad="rotate()"><IMG
SRC="banners/image1.gif" WIDTH="400" HEIGHT="75" NAME="adBanner" ALT="Ad
Banner">&nbsp;</body></html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top