<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">well, so it seems that the onbeforeunload is being triggered when you return to the page (or when you leave it) and that's what is killing the swf...<DIV><BR class="khtml-block-placeholder"></DIV><DIV>since you removed that code, you may find that if you have a video playing, and you leave the page, the audio may continue for that video...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>are you using flv video in the MCE app? (our experience with this was bad since it looks like crap on extenders - ms generally won't let you do that if you want your app to appear in their online spotlight area)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>but your solution to take out the code is certainly a viable fix if you don't see any side effects with your streaming flv videos. As I said before, flash player 9 inserts similary functions, so the trick is to remove those but not replace them with the custom code in swfobject.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Nov 15, 2006, at 12:51 PM, Kareem Kouddous wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Thanks Geoff.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I removed the lines below from the swfobject.js and it fixed the problem. What do you suggest I do going forward? I wish I had the cycles to try and research and fix the problem but unfortunately I don't. I was thinking that a temporary band-aid is to leave these lines removed locally and manually merge any updates to swfobject until this problem is resolved. Do you see any issues with this? I only use swf on my page but I do steam FLV video.</DIV><DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><DIV>// fixes bug in fp9 see <A href="http://blog.deconcept.com/2006/07/28/swfobject-143-released/">http://blog.deconcept.com/2006/07/28/swfobject-143-released/</A></DIV><DIV>deconcept.SWFObjectUtil.prepUnload = function() {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>__flash_unloadHandler = function(){};</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>__flash_savedUnloadHandler = function(){};</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>if (typeof window.onunload == 'function') {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">          </SPAN>var oldUnload = window.onunload;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">             </SPAN>window.onunload = function() {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                       </SPAN>deconcept.SWFObjectUtil.cleanupSWFs();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                       </SPAN>oldUnload();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">         </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>} else {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">             </SPAN>window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">       </SPAN>}</DIV><DIV>}</DIV><DIV>if (typeof window.onbeforeunload == 'function') {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>var oldBeforeUnload = window.onbeforeunload;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>window.onbeforeunload = function() {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">         </SPAN>deconcept.SWFObjectUtil.prepUnload();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>oldBeforeUnload();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>}</DIV><DIV>} else {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On Nov 14, 2006, at 8:43 PM, Geoff Stearns wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Well, I've used SWFObject in a couple of MCE apps, and all has been fine.. but I'm not sure than any of them use the customviewport to show fullscreen stuff, though.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>That article that you linked made me think of something though:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>In FP9, some code was added in to 'clean up' the swfs on the page when the page unloads - if you are using external interface, the Flash player inserts a function in the page... I actually ended up rewriting the functions with SWFObject because they are a little buggy - if you have more than one swf on the page you get an out of memory error... but anyway...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>what may work is this: try overwriting the functions that are inserted into the page - you can see how to do this if you look at the current swfobject code (ceck the uncompressed version) - this replaces the functions with my own, but you could just replace them with empty functions and see if that fixes it... the white screen might be the leftover space that the swf is taking up after their special script unloads it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>let me know if that doesn't fix it... i'm actually installing MCE in parallels right now to do some testing of our old apps (and I seem to remember another bug we had in a new MCE app that's just about finished).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Nov 14, 2006, at 3:24 PM, Kareem Kouddous wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Verdana; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Hi All,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am having a problem with an HTML Media Center Application (like MTV's Overdrive or Comedy Central's Motherload) using SWFObject to embed a flash movie that uses ExternalInterface. My application uses the Custom Viewport to play video and if you go fullscreen and then try and go back to the application the flash movie disappears and is replaced with white background. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>- This may be related to this problem - <A href="http://blog.metawrap.com/blog/externalInterfaceUnderFlashPlayer9IsEvilTheWhiteScreenOfDeath.aspx">http://blog.metawrap.com/blog/externalInterfaceUnderFlashPlayer9IsEvilTheWhiteScreenOfDeath.aspx</A></DIV><DIV>- The problem occurs even if the swfobject.js is included in the page but not used (as long as ExternalInterface is used for javascript to flash communication).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Has anyone else experienced this problem? If so, are there any known workarounds (apart from going back to my custom way of embedding the flash movie)? Any help would be greatly appreciated.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Kareem</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SWFObject mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</A></DIV> </BLOCKQUOTE></DIV><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SWFObject mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</A></DIV> </BLOCKQUOTE></DIV><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SWFObject mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:SWFObject@lists.deconcept.com">SWFObject@lists.deconcept.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com">http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>