[SWFObject] Bug: IE and ExternalInterface.addCallback()

Aran Rhee aran.rhee at qdc.net.au
Wed Aug 2 23:23:24 PDT 2006


Daniel.

If you check the other posts today (and the last couple of days), you'll see
there are bugs with flash 9 and external interfaces. In coding a workaround,
their might have been some other issues introduced into swfObject.

There is a new version of swfObject 1.4.4 which should deal with all
external interface issue both Flash 9 and swfObject related.

grab v. 1.4.4 from SVN - svn.deconcept.com/swfobject/trunk/ 

Cheers,
Aran

> -----Original Message-----
> From: swfobject-bounces at lists.deconcept.com 
> [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of 
> daniel.zabinskas at immersive.com.au
> Sent: Thursday, 3 August 2006 3:24 PM
> To: swfobject at lists.deconcept.com
> Subject: [SWFObject] Bug: IE and ExternalInterface.addCallback()
> 
> It seems there is a bug in IE when you embed an swf that uses the
> ExternalInterface.addCallback() method using swfobject.js.
> 
> Any javascript call on the same page triggers the 
> window.onbeforeunload handler. Because of this the flash file 
> disappears because the flash objects style.display is set to 
> "none" in the deconcept.SWFObjectUtil.cleanupSWFs
> function.
> 
> In my project, I commented out the following if statement in 
> the swfobject.js file:
> 
> if(typeof window.onbeforeunload=="function"){
>     var oldBeforeUnload=window.onbeforeunload;
>     window.onbeforeunload=function(){
>         deconcept.SWFObjectUtil.cleanupSWFs();
>         oldBeforeUnload();
>     };
> }else{
>     window.onbeforeunload=deconcept.SWFObjectUtil.cleanupSWFs;
> }
> 
> And now it works fine. Luckily, I don't have any streaming 
> content in my flash file. I have attached some files that 
> show the bug in action.
> 
> Thought you might like to know.
> 
> Cheers
> Daniel
> 
> 



More information about the Swfobject mailing list