Results 1 to 4 of 4

Thread: Start/Stop Buttons for Flash (.swf) video working in all browsers but IE.

  1. #1
    Join Date
    Jan 2006
    Posts
    118
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Start/Stop Buttons for Flash (.swf) video working in all browsers but IE.

    I've got a flash video (.swf) with a set of start/stop buttons. My problem is that it works in all browsers, including Safari, but not in IE. I'm not a big fan of IE, so don't know the particular code to use. Can anyone whose more familiar with the particulars of IE help me out, please. Here's the code:

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="320" height="240" id="ASongOfSpring_1" align="">
    <param name=movie value="http://ohiobuttons.org/test/AV_Files/ASongOfSpring_1.swf"> 
    <param name=quality value=high> 
    <param name=bgcolor value=#333399> 
    <EMBED id="video1" src="http://ohiobuttons.org/test/AV_Files/ASongOfSpring_1.swf" quality=high bgcolor=#333399 width="320" height="240" name="ASongOfSpring_1" align="" type="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> 
    </object>
        </td></tr></table>
        <table border=0>
        <tr><td><a href="#"><img src="Graphics/Spring_Show/sound-off.png" border=0 onclick="document.getElementById('video1').StopPlay()"></a></td>
        <td width=35>&nbsp;</td>
        <td><a href="#"><img src="Graphics/Spring_Show/sound-on.png" border=0 onclick="document.getElementById('video1').Play()"></a></td>
        </tr></table>
    Thanks in advance.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,069
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Get rid of the object. I did and it worked in IE 10 in it's IE 10, 9, and 8 modes:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    </head>
    <body>
    <EMBED id="video1" src="ASongOfSpring_1.swf" quality=high bgcolor=#333399 width="320" height="240" name="ASongOfSpring_1" align="" type="application/x-
        </td></tr></table>
        <table border=0>
        <tr><td><a href="#" onclick="document.getElementById('video1').StopPlay(); return false;">Stop</a></td>
        <td width=35>&nbsp;</td>
        <td><a href="#" onclick="document.getElementById('video1').Play(); return false;">Play</a></td>
        </tr></table>
    </body>
    </html>
    Some IE might not be able to stream the embed while it's loading, and IE 9 or 8 or both might not perform as they do in the IE 9 and 8 modes of IE 10. But it's worth a shot. If all else fails:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">
    function stopVid(){
    	try{document.getElementsByName('video1')[0].StopPlay();}
    	catch(e){document.getElementById('video1').StopPlay();}
    }
    function playVid(){
    	try{document.getElementsByName('video1')[0].Play();}
    	catch(e){document.getElementById('video1').Play();}
    }
    </script>
    </head>
    <body>
    <object name="video1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="320" height="240" id="ASongOfSpring_1" align="">
    <param name=movie value="ASongOfSpring_1.swf"> 
    <param name=quality value=high> 
    <param name=bgcolor value=#333399> 
    <EMBED id="video1" src="ASongOfSpring_1.swf" quality=high bgcolor=#333399 width="320" height="240" name="ASongOfSpring_1" align="" type="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> 
    </object>
        </td></tr></table>
        <table border=0>
        <tr><td><a href="#" onclick="stopVid(); return false;">Stop</a></td>
        <td width=35>&nbsp;</td>
        <td><a href="#" onclick="playVid(); return false;">Play</a></td>
        </tr></table>
    </body>
    </html>
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Jim Weinberg (10-24-2013)

  4. #3
    Join Date
    Jan 2006
    Posts
    118
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hey John.

    Many thanks. I tried your first suggestion and it seems to work fine. However, I'm holding your second set of code in reserve, just in case.

    I can't believe it was that simple. You have no idea how long I've been scr.... messing around with this.

    Again, my thanks.

    Jim

  5. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    This thread has started to attract a huge amount of spam (all deleted at this point). So rather than let that go on, I'm going to close it. I think your question has been answered and your problem is solved. But if you have more questions, please just post a new thread as needed. Or you can PM one of the mods to ask to have this re-opened.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Similar Threads

  1. Replies: 2
    Last Post: 06-25-2010, 05:02 PM
  2. Resolved Javascript start/stop buttons in UltimateSlide(1.5)
    By combat2k in forum JavaScript
    Replies: 1
    Last Post: 08-06-2009, 12:31 PM
  3. Working with Flash Video
    By btelecky in forum Flash
    Replies: 4
    Last Post: 03-12-2009, 01:56 PM
  4. Replies: 0
    Last Post: 07-04-2007, 01:49 PM
  5. Replies: 3
    Last Post: 09-24-2006, 07:34 AM

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
  •