Hi Aran

Thanks very much. It was quite easy after reading your link, but impossible 
before!
I was able to watch what had happened to my html after each step from the 
"source" listing.

Bob Woodman
  ----- Original Message ----- 
  From: Aran Rhee 
  To: [email protected] 
  Sent: Monday, December 07, 2009 12:49 AM
  Subject: Re: Cutting a video short and resarting it


  Hi Bob.


  I am enetering this thread a bit late (without the offline diswcussion 
knowledge), but from what I can see from your code, you are wanting to 
dynamically recreate the "videoframe" div once you have removed it, not 
re-insert the swfobject.js library file.


  What happens when you remove the swf is that you now no longer have an 
element "videoframe" to replace your swf content with. when you run your 
newvideo function, <div id="videoframe"> does not exist any more!




  Have a look at this tut (in the section "Using an 'onclick' event to replace 
a loaded SWF with another SWF"). It should get you up and happening. The 
technique is much the same as you are already using to dynamically insert in an 
element to the DOM.


  http://pipwerks.com/swfobject/load-onclick/2.0/index.html




  I hope this helps.




  Cheers,
  Aran







  On Mon, Dec 7, 2009 at 7:40 AM, Bob Woodman <[email protected]> 
wrote:

    Hi Sam,

    I want to thank you for your help. Inserting 
swfobject.removeSWF("videoframe");certainly got both browsers working in the 
same way and the video halted.I feel most inadequete since if I had read on 
within your tutorials I am sure I would have been able to sort it out myself. 

    However, I am not capable of re-starting the video if you go to 
www.kophillclimb.org.uk/_index1.html you will see I have inserted into the 
javascript

    function newvideo()
      {
      var h = document.getElementsByTagName("head")[0];
      var s = document.createElement("script");
        s.setAttribute("id", "dynamicSwfobject");
        s.setAttribute("type", "text/javascript");
        s.setAttribute("src", "swfobject.js");
        h.appendChild(s); 
        var t = setInterval(function()
         {var a = typeof swfobject;
          if (typeof swfobject != "undefined")
          {
          var flashvars = {};
         var params = {loop:"false"};
         var attributes = {};
         swfobject.embedSWF("kophillintro2.swf", "videoframe", "599", "479", 
"9.0.0", "expressInstall.swf", flashvars, params, attributes);
         clearInterval(t);
         t = null;
         }
         }, 50);
      }

    and I have called it from the HTML line 85 with - onclick="newvideo()". The 
javascript seems to have worked but the video does not restart!Any help 
appreciated.



    Bob Woodman

---- Original Message ----- From: Sam Sherlock 
      To: [email protected] 
      Sent: Monday, November 30, 2009 4:13 PM
      Subject: Re: Cutting a video short


      Hi Bob, 


      A good resource of swfobject examples can be found here


      tests for both of the method I mentioned (and everything else too)
      http://code.google.com/p/swfobject/wiki/test_suite


      
http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_api_create_remove.html


      your code should remove the swf like so
swfobject.removeSWF("videoframe");


      and more here too (examples and instructions)
      http://pipwerks.com/lab/swfobject/


      FYI the video does stop in my version of firefox (version 3.5.5); even so 
I would still remove and add when navigating back to the tab.  Removing it is a 
sure fire way to stop it playing + I feel its safer than leaving it there in an 
inactive tab (browsers can some times crash when lots is going on - removeswf 
removes the flash from the page).  I have not checked other browsers 


      you could check the value of menuname within the change function you have 
in _khc.js




      (I have some code I have tried in firebug to get this to work and may be 
able to revisit it later)


      - S

      ps I replied to the list; other may have something to add / suggest



      2009/11/30 bob.woodman <[email protected]>

        Hi Sam,

        Thanks for the rapid response. I feel I am a beginner in a man's
        world.

        I tried onclick="javascript:document.getElementById
        ('videoframe').removeSWF("kophillintro2.swf"); changemenu
        ('home_page')";

        where "videoframe" is the Id of the object and "kophillintro2" the
        name of the video. No effect in Firefox or IE.

        The document.getElementById('videoframe').stop(); works in IE but not
        in Firefox. This when when in IE is very good (it operates like
        "pause" because if you go back to the video you can start it from
        where you stopped it.)

        Bob Woodman


        On Nov 30, 1:17 pm, Sam Sherlock <[email protected]> wrote:
        > I would removeSwf when changing from the video tab to any other tab
        >
        > then when (re-)activating the video tab createSwf
        >
        > http://code.google.com/p/swfobject/wiki/api
        >
        > - S
        >

        > 2009/11/30 bob.woodman <[email protected]>
        >
        > > Hi,
        >
        > > Onwww.kophillclimb.org.uk/_index.htmlI am using swfobject 2 to

        > > deliver a video on startup. I provide a tab to switch to a new page 
if
        > > the user wishes to cut it short and view the rest of the  web site. 
On
        > > firefox as soon as the "Video Page" has its display set to none the
        > > video stops. On IE7 the video carries on but is not shown, however 
the
        > > sound continues.
        >
        > > How can I get IE to stop playing the video?
        >
        > > Any help appreciated.
        >
        > > Bob Woodman
        >
        > > --
        >
        > > You received this message because you are subscribed to the Google 
Groups
        > > "SWFObject" group.
        > > To post to this group, send email to [email protected].
        > > To unsubscribe from this group, send email to

        > > 
[email protected]<swfobject%[email protected]>

        > > .
        > > For more options, visit this group at
        > >http://groups.google.com/group/swfobject?hl=en.




      --

      You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
      To post to this group, send email to [email protected].
      To unsubscribe from this group, send email to 
[email protected].
      For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.



--------------------------------------------------------------------------



      No virus found in this incoming message.
      Checked by AVG - www.avg.com 
      Version: 8.5.426 / Virus Database: 270.14.87/2536 - Release Date: 
11/30/09 07:31:00



    --

    You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to 
[email protected].
    For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.




  --

  You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
  To post to this group, send email to [email protected].
  To unsubscribe from this group, send email to 
[email protected].
  For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.



------------------------------------------------------------------------------



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.5.426 / Virus Database: 270.14.96/2548 - Release Date: 12/06/09 
07:30:00

--

You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.


Reply via email to