Results 1 to 6 of 6

Thread: Animated GIF's stopping at wrong time

  1. #1
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Animated GIF's stopping at wrong time

    Well I hope someone can help me solve this...When someone clicks on a link that opens up an audio file on the web page, and it opens up Windows Media Player on the persons computer to listen to the file, when they close it out and it is showing the web page again, the animated GIF is not in action anymore. The page has to be refreshed before the animated GIF will start moving again. I tried different things such as _blank, which it doesn't act as it should in other aspects, tried _self, tried _parent and so forth to see if any of those open page types would have any effect on the animated GIF moving again without the refresh...which none did. Does anyone have the solution to this?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Do you have JavaScript on the page? IE will sometimes stop animated gifs if there is a JS function being called.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No I don't have any JavaScript on the page. Just a CSS site.

    www.grandlakefullgospel.com

    It's on the audios page under the listing of "Our Sermons" link on the right hand side. The date is the link for the audio under the "Our Sermons" section.

  4. #4
    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

    Multimedia content like audio doesn't work the same on all systems or even in different browsers on the same system.

    As far as IE goes, you are at the mercy of three different factors, two of which collide to cause the current situation, there are various ways around these though, but one of the factors requires javascript to overcome. If you are opposed to javascript though, you might be able to live with the inconvenience of the one thing to solve your other problem. Here's what's happening:

    1) IE automatically opens Media Player for a link of this type (one to an mp3 file), regardless of whether the link is set to any target. As a result, if you set the target to blank, which would avoid your problem, you get an extra blank window that you don't want, plus media player, along with keeping the launch page - messy, but the animation is still working.

    2) If you set the target to self (which is the same as no target), when the link is clicked, IE thinks it is time to start unloading the page. As a part of this process, it stops gif animations. Now you still get Media Player opening, no extra blank window (good), but the animation stops.

    3) You could embed your mp3 on either the audios.html page or on a separate page, but now, there will be no access to the controls in IE without one of the following:

    a) Click to activate - the user must first click on the embedded player before being able to use the controls.

    b) Some javascript - for the majority of users who do have javascript enable, a fairly simple javascript can overcome the need for 'click to activate'.

    I would recommend embedding the audio on the audios page, and using javascript to avoid 'click to activate' for as many users as possible. This has the added advantage of being compatible with other browsers, as would opening a new page with the embed on it. Any of the other methods would result in other browsers reacting differently than IE.
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you I will try the embedding along with using JavaScript. I had originally done it as a blank, and I got that messy mess of having a blank page to close as well as the media player. At this point in time I have it set to self, which works great ...except for the animation prob. hehe, Thanks again. Could you point me in the direction to look at some JavaScript that would work for this? I know the embed code, so that's not a problem. here is the code I found that will enable you to click on a link...whichever link you choose and they will play in the embedded media player. I have forgotten where I found it or I would give the credit where the credit is due.




    Firstly make sure your media player has an ID attribute (I use mplayer in my example). Then on each link specify this attribute: onClick="document.all.mplayer.filename=document.all.this.href;"


    <a href="bbgirl.mp3" onClick="document.all.mplayer.filename=document.all.this.href;">Aqua - Barbie Girl</a><BR>
    <a href="notme.mp3" onClick="document.all.mplayer.filename=document.all.this.href;">Shaggy - Wasn't Me!</a><BR>
    <a href="http://url or path to your media" onClick="document.all.mplayer.filename=document.all.this.href;">Artist - Song Title</a><BR>

    <OBJECT id="mplayer" height="230" width="230" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
    <PARAM NAME="AutoStart" VALUE="0">
    <PARAM NAME="Filename" VALUE="">
    <PARAM NAME="Enabled" VALUE="1">
    <PARAM NAME="PlayCount" VALUE="1">
    <PARAM NAME="SendPlayStateChangeEvents" VALUE="1">
    <PARAM NAME="ShowStatusBar" VALUE="1">
    </OBJECT>



    Is there any problem with that code that anyone sees? To be able to click on any of the audio links and they all play in the same media player that has its small controls showing.

  6. #6
    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

    That will no longer work (doesn't work in IE 7, even though it looks like it might). I'm not aware of any convenient way to set up a player with a play-list across browsers except perhaps using Flash. However, you can make up a simple small player for each mp3, that is cross browser:

    Code:
    <embed src="audio/12-16-07.mp3" width="320" height="42" type="audio/x-mpeg" autoplay="false">
    The nice thing about it is that it will use whatever audio player the user has configured, so even without Media Player available, if the person has Real Player or QuickTime, they can here the clip.

    The problems with it are that it isn't considered 'standard' by the W3c, and that in IE starting with 6 and Opera starting with 9 you need to activate the player using the spacebar or by clicking on the player before you can use it.

    That's where javascript comes in handy. Using my own utility:

    http://home.comcast.net/~jscheuer1/s...activate_w.htm

    I generated this code:

    Code:
    <noscript><embed src="audio/12-16-07.mp3" width="320" height="42" type="audio/x-mpeg" autoplay="false"></noscript>
    <script type="text/javascript" src="holy1.js">
    /* Generated by: Click to Activate Override Wizard
     * © John Davenport Scheuer email:jscheuer1REMOVETHISTOMAIL@comcast.net
     * This credit must remain for legal use. */
    </script>
    for the page itself, and this code for holy1.js (the filename is up to you, but it must be unique for each player on the same page):

    Code:
    document.write('<embed src="audio/12-16-07.mp3" width="320" height="42" type="audio/x-mpeg" autoplay="false">');
    That takes care of the 'spacebar or click' requirement in the browsers mentioned.
    - John
    ________________________

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

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
  •