Rotating Images

  • Thread starter Thread starter JCO
  • Start date Start date
J

JCO

Why do the "Rotating Graphics (gif file), sometimes don't show up when I
preview or view it in the explorer. To fix this, I usually do a property
and reselect the image from the folder that it is in. It already contains
the correct folder but somehow this fixes it. Makes me wonder if I will be
publishing something that is not stable. Anyone has an idea on this... let
me know.

Thanks
 
-----Original Message-----
Why do the "Rotating Graphics (gif file), sometimes
don't show up when I preview or view it in the
explorer. To fix this, I usually do a property
and reselect the image from the folder that it is in.
It already contains the correct folder but somehow this
fixes it. Makes me wonder if I will be publishing
something that is not stable. Anyone has an idea on
this... let me know.

If these are small files arranged by means of an HTML
table, you may be experiencing a bug-like feature in
recent versions of IE.

To work around this, add a script like the following to
your <head> section.

<script>
var imgSpin = new Image();
imgSpin.src = "images/spin.gif";
</script>

where images/spin.gif is the path to your file.

If you're having this probolem with more than one file,
repeat lines 2 and 3 as often as necessary. Just be sure
to change the variable name (i.e. "imgSpin"( on each pair
of lines.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
I will give this a shot. I don't know much about FP so I dont know if I can
do this or not.
Will it make any difference if the gif file is copied 10 times (the number
of menus)? I wont have to repeat it that many times will I?
 
You'll have to be more specific. I'm a newbie in this area:
My image name is SoccerBallRotating.gif and is in the "Images" folder...
Images/SoccerBallRotating.gif

I don't know how to add a script file, obviously need to learn. This site
consists of Frames. The left Frame has the menu links to all the pages.
Each link has a rotating soccer ball next to it. The soccer ball in incased
in a Table and is repeated 15 times (once per link).

Anything more specific would help...mean while, I will try to read stuff on
scripts.
Thanks.
 
Think I have it:
I selected "Split" at the bottom of FP2003.
I saw the section Scripts that was incased inside of the header.
Within the Scripts, their were 3-functions all ready written.
At the end of all, within the Scripts section, I added...
var imgSpin = new Image(); imgSpin.src = "Images/SoccerBallRotating.gif"
(all one line). It seems to be working although not sure this "Script
Insert" is the fix. Only time will tell.
The Frame consits of many rotating soccer balls since I have one place
infront of each menu item. All of these are in a section that has the
single Header and Script section. I'm not sure I understand what you were
talking about when you stated that it may have to be added for each image
that rotates.

Please let me know if I did this correctly. Sorry about being a newbie.
Also, the last several days, i've been looking at your book (Inside Out) as
consideration for purchase.

Thanks for your input.
 
I'm afraid that there has been a misunderstanding. First, everyone
misunderstood what you meant by "Rotating Graphics" as this term usually
refers to graphics that are switched out in the page. In your case, what you
were describing was an animated GIF file. The fact that the animation was of
a soccer ball rotating was not relevant, as the type of file is an animated
GIF, not a "Rotating Graphic." Based upon what they thought you meant, they
(Jim in particular) gave you some advice, which you then misunderstood,
thinking that it applied to your problem.

In fact, I'm not sure what (if any) your problem is, now that I understand
it. An animated GIF file animates all by itself, without any scripting. In
your original message you stated that the graphic doesn't "show up" when you
preview your file in Internet Explorer. Most likely this is a caching issue,
and I'm not sure whether there is a fix for it. When your browser requests
an HTML document from a source, such as a web site, it downloads a copy of
the HTML file and each image in that file, and then displays the file from
its' Temporary Internet Files folder. Sometimes, depending on a number of
circumstances, it doesn't even request the file if it already has a cached
copy. This might be the cause of your issue. You may be previewing an older
version of the page. Again, I'm not sure whether there's any way to fix this
behavior, but emptying your Internet Explorer's Temporary Internet Files
folder will give you at least a temporary fix.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
What you did should work. A slight improvement would be to create a
new <script></script> block instead of using a new one. That's because
if FrontPage created the existing script block, it may overwrite the
whole thing when you change some FrontPage component.

If you're using the Images/SoccerBallRotating.gif file ten times in
the same page, you only need to preload it once. (That's what the
script does: it "preloads" the image so it's ready for use in your Web
page.)

Your page is in the root folder of your Web, right? Otherwise you need
to adjust the path "Images/".

Thanks for considering the book.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Thanks Kevin for your input (and well explain).
I had already tried empting the cache and history which did not solve the
problem.
After implementing Jim's Fix, it did begin working. Coincendental? ...
Maybe!

I apologize for not explaining correctly. Yes it is a gif file that
animates... a rotating soccer ball.
 
Yes, I understand what Jim's solution did, which is to pre-load the image
via scripting. I've never had to use it before, but I'm glad it worked for
you. Have a wonderful Holiday!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Kevin Spencer said:
I'm afraid that there has been a misunderstanding. First, everyone
misunderstood what you meant by "Rotating Graphics" as this term usually
refers to graphics that are switched out in the page. In your case, what you
were describing was an animated GIF file. The fact that the animation was of
a soccer ball rotating was not relevant, as the type of file is an animated
GIF, not a "Rotating Graphic." Based upon what they thought you meant, they
(Jim in particular) gave you some advice, which you then misunderstood,
thinking that it applied to your problem.

No, I realized this was an animated GIF.

The problem reminded me of IE's intermittent failure to display small
graphics that appear in tables, a problem I usually solve by
preloading the image. So I thought the same thing might work.

Granted, animated GIFs usually aren't very small. But nevertheless,
with ten of them on one page, I was hoping they weren't large.

I ruled out a corrupt animated GIF file because it does display
correctly in some instances.

Caching is a potential cause, except that if the picture were never
successfully displayed, it wouldn't be in the cache.

JCO, is this page on the Internet somewhere? It would help to actually
see it.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Yes, Jim, you did, and I didn't realize you did! Have a Merry Christmas,
buddy!

--
Ho Ho Ho,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
No Jim, it is not published yet!
I wish I had a way for you to see it.

Is there another way ... for you to see it?
It is working correctly now and I have not had anymore problems.
 
Back
Top