Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: repeat animated gif on return to page?

  1. #1
    Join Date
    Aug 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default repeat animated gif on return to page?

    Can anyone tell me how to use HTML so that an animated gif, that only plays once, will play again after another link has been clicked and then the user returns to the original page (using back button)? any help would be great.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You mean it doesn't? I would have thought that it would. I'm thinking that it may in some browsers and not in others. Do you have a link to the page?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yojimbo.pwp.blueyonder.co.uk

    and I use firefox so no messing there. Its my first attempt at a web page and its the header graphic that I want to repeat, to match the sound.

    I'll try looking at it in IE but surely thats a bad idea?

  4. #4
    Join Date
    Aug 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah you were right. It works in IE but not in my firefox. hmm. the sound doesn't match up in IE though, like it does with firefox. Ah well, such is life. Thanks

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes, I've noticed this. You could try using Javascript to reset the src of the image. That should cause it to play again.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Aug 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok, I've never used javascript but i'll give it a try tomorrow. cheers.
    Last edited by swanky; 08-18-2006 at 10:05 PM.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In that case, try something simple, like replacing this:

    HTML Code:
    <H1 Align=CENTER> <IMG SRC="yojimboSign.gif"> </H1> 
    <embed src="electricity.wav" loop="false" autoplay="true" hidden="true"></embed>
    with this:

    HTML Code:
    <h1 align="center"> <img id="yojimbo" src="yojimboSign.gif"> </h1> 
    <embed src="electricity.wav" loop="false" autoplay="true" hidden="true"></embed>
    <script type="text/javascript">
    document.getElementById('yojimbo').src="yojimboSign.gif";
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default

    What about flash, I think it would be better, because <embed> takes more time (resources?) to initialize, and, well, flash is more common than just image and sound separately.

  9. #9
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Does it not automatically do this on every new click?

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What about flash, I think it would be better, because <embed> takes more time (resources?) to initialize
    ... what?
    You do realise that using Flash would also involve an <embed> element?

    It may be easier, but it's not as well supported.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •