[SWFObject] SUMMARY: Ongoing 'disspearing swfs'/'out of memory' errors issues

Geoff Stearns geoff at deconcept.com
Wed Aug 2 11:00:55 PDT 2006


ok, I think i may have fixed this - just had to actually look at what  
the temp. fix was doing and make it a little cleaner.

attached you'll see a preview of swfobject 1.4.4 - if you are having  
disspearing swf issues, please try using this file and let me know if  
you still see the issue.

So far using my multitude of collected test pages it looks pretty good.

i'll check this into svn as well in a few minutes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: swfobject_source.js
Type: text/javascript
Size: 8702 bytes
Desc: not available
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060802/9aed2060/attachment-0005.bin>
-------------- next part --------------

On Aug 2, 2006, at 1:30 PM, Geoff Stearns wrote:

> here's a quick summary and a temporary fix for you all:
>
> Currently when you have a link on a page that uses
> href="javacript:..." it triggers the onbeforeunload event in IE. This
> is bad because in 1.4.3 I use the onbeforeunload event to remove some
> code that Flash Player 9 inserts into the page to clean up swfs (this
> is because of a bug in IE that causes streaming swf files to keep
> playing even after you navigate away from the page - basically IE
> sucks ass)
>
> Unfortunately, the code that Flash Player 9 inserts doesn't work so
> well when you have more than one swf on the page - you get an "Out of
> memory" error at line 56 when you leave the page. I have a very
> similar function that does not cause the out of memory error that I
> was using to replace the 'bad' function.
>
> Since I was using onbeforeunload to clear out the 'bad' function, you
> can see how the above two issues cause problems, and this is why the
> swfs are dissapearing.
>
> We did find a fix that we are using with the NBC universal video
> player, which i'll share with you all who need temporary fixes.
>
> you can just place this function anywhere in your js or on the page
> and it will take care of things for you. Just be warned that if you
> already have an onunload event, this will delete it, so you'll have
> to work around that on your own until I can come up with a cleaner
> solution.
>
>
> window.onbeforeunload = function() {
> 	__flash_unloadHandler = function(){};
> 	__flash_savedUnloadHandler = function(){};
> 	window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
> }
>
> using this in conjunction with SWFObject 1.4.2 (and maybe 1.4.3)
> should be fine. You can get older swfobject versions from the SVN
> repository here:
>
> http://svn.deconcept.com/swfobject/tags/
>
> Let me know if anyone has some ideas on a clean way to fix this, or
> any other questions about it.
>
>
>
> On Aug 2, 2006, at 1:48 PM, geoff.+.nwo at neverbox.com wrote:
>
>>
>> I use multiple SWF files on the same page AND they use flashvars  
>> (i.e.
>> they're clickable).
>>
>> On unloading the page, the entire browser gets stuck with a random
>> error
>> (sometimes an official error, sometimes it just closes, sometimes
>> it gets
>> stuck and requires ctrl+alt+del).
>>
>> Many people have tried it and it happens with IE, XP SP2 and every
>> flash
>> version since at least 6 (those files are made in v6).
>>
>> It was fixed as soon as I removed this function:
>> for(var x in _2d[i]){
>> if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}
>>
>> Only then I found out another annoying (yet harmless) problem -
>> when you
>> click any of the files, each and every SWF file in the page
>> dissapears (of
>> course, seconds later you're taken to another page, but still...).
>> To fix this, I've deleted
>> _2d[i].style.display="none";
>>
>> Or in other words, the entire loop of for(var i=0;i<_2d.length;i++){
>>
>> Geoff told me those functions have something to do with streaming
>> content and
>> I can safely remove them, but I'm trying to convince him that this
>> problem
>> affects everyone who uses multiple SWF files on the same page and
>> they're
>> clickable.
>> _______________________________________________
>> 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



More information about the Swfobject mailing list