making loops

  • BenitoCamelaxxx
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 28, 2004
  • Posts: 9
  • Status: Offline

Post October 1st, 2004, 4:07 pm

:) :D 8) :wink:

Hi there, I've got a question, hope you can help me, I don't think its a hard one ... anyways .. I've got a gif on my webpage, but after a certain time it stops moving, which is normal, what I'd like is that it didnt stop moving, is there any way to do that?

Code: [ Select ]
<p align="right"> &nbsp;&nbsp; <a href="mailto:my@email.add?Subject=My Subject"> <img border="0" src="my_pic.gif" width="132" height="103"></a></p>


looking forward to your answers :idea: :idea: :idea:
thx a bunch

-----------------------------
BE TRUE TO YOURSELF
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post October 1st, 2004, 4:07 pm

  • darkthroniar
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jul 14, 2004
  • Posts: 42
  • Loc: Los Angeles, CA
  • Status: Offline

Post October 1st, 2004, 4:47 pm

Hi..

Open the .gif file in a gif editor like ImageReady and modify to loop

:)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post October 2nd, 2004, 5:38 am

Just an FYI, even though darkthroniar's advice will get the result you want, you should know that as soon as I hit the ESC button on my keyboard, your gif animation will stop. And since I find animated gifs annoying and distracting, that's the first thing I do when I come to a page that has them.

If you've never seen what I'm talking about just go to the OZZU main page and scroll to the bottom of the screen where there are animated gifs. Then hit ESC.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post October 2nd, 2004, 9:26 am

Wow ATNO/TW, I never knew that! Thanks! You really do learn something new everyday...
*off to find a page with loads of animated GIFs just so he can press the 'ESC' button and chuckle to himself*
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post October 2nd, 2004, 7:48 pm

ATNO.... you're going to hate me :lol:
This example for restarting the animation when ESC is pressed only works in IE as far as I know.
Attack of the undead GIF

BenitoCamelaxxx the outerHTML method in this example could be modified with a setInterval to loop your image.
Here's the source of that example,
Code: [ Select ]
<html><head><title>GIF Zombie</title>
<script language="javascript">

function GIFzombie(theKey){
if(theKey == 27){
  document.getElementById("g").outerHTML = document.getElementById("g").outerHTML;
}
}

</script>
</head>

<body onKeypress="GIFzombie(event.keyCode);">
<div align="center">Go ahead, press ESC.
<br><br>
<a href="http://www.bigwebmaster.com"><img src="banner22.gif" id="g"></a>
</div>
</body>
</html>
  1. <html><head><title>GIF Zombie</title>
  2. <script language="javascript">
  3. function GIFzombie(theKey){
  4. if(theKey == 27){
  5.   document.getElementById("g").outerHTML = document.getElementById("g").outerHTML;
  6. }
  7. }
  8. </script>
  9. </head>
  10. <body onKeypress="GIFzombie(event.keyCode);">
  11. <div align="center">Go ahead, press ESC.
  12. <br><br>
  13. <a href="http://www.bigwebmaster.com"><img src="banner22.gif" id="g"></a>
  14. </div>
  15. </body>
  16. </html>

To loop it you can take the "if" condition out of the GIFzombie function, & use setInterval with the number of seconds it takes for the image to stop.
  • katana
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 07, 2004
  • Posts: 2390
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post October 4th, 2004, 10:37 am

Quote:
Only works in IE as far as I know.

Works in Firefox...
Why do geeks get Halloween and Christmas confused?
Because 31 Oct == 25 Dec
www.darren-king.co.uk
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 10, 2004
  • Posts: 2194
  • Loc: Canada
  • Status: Offline

Post October 4th, 2004, 10:44 am

No it doesn't...
I think his script makes the ESC key NOT function; in Firefox the image stops looping.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 126 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.