[SWFObject] Problem with SWFObject, ExternalInterface and Microsoft Windows Media Center

Kareem Kouddous software at dottvtech.com
Wed Nov 15 09:51:23 PST 2006


Thanks Geoff.

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.

// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/ 
swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
	__flash_unloadHandler = function(){};
	__flash_savedUnloadHandler = function(){};
	if (typeof window.onunload == 'function') {
		var oldUnload = window.onunload;
		window.onunload = function() {
			deconcept.SWFObjectUtil.cleanupSWFs();
			oldUnload();
		}
	} else {
		window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
	}
}
if (typeof window.onbeforeunload == 'function') {
	var oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		deconcept.SWFObjectUtil.prepUnload();
		oldBeforeUnload();
	}
} else {
	window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}


On Nov 14, 2006, at 8:43 PM, Geoff Stearns wrote:

> 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.
>
> That article that you linked made me think of something though:
>
> 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...
>
> 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.
>
> 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).
>
>
>
>
> On Nov 14, 2006, at 3:24 PM, Kareem Kouddous wrote:
>
>> Hi All,
>>
>> 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.
>>
>> - This may be related to this problem - http://blog.metawrap.com/ 
>> blog/ 
>> externalInterfaceUnderFlashPlayer9IsEvilTheWhiteScreenOfDeath.aspx
>> - 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).
>>
>> 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.
>>
>> Thanks,
>>
>> Kareem
>>
>>
>>
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20061115/8e0eb001/attachment-0005.htm>


More information about the Swfobject mailing list