I've been listing posts on the sIFR forum regarding a problem I'm having with SWFObject 1.4.4 and sIFR 3 r209 in IE. After much research, not sure where the problem is arising ... so posting a link to the discussion here and hoping for some feedback if anyone has thoughts. Thanks.
I'm not sure what would cause this... I'm pretty sure sIFR (pre 3.0) used to work with SWFObject. Maybe there is some sort of race condition when the scripts load and execute? Try putting a defer="defer" on your script tag that includes the swfobject.js file, and also try upgrading to swfobject 1.5 - you can get it from the SVN repository here: svn.deconcept.com/swfobject/trunk/.
Oops ... oh wait, that didn't work. My sIFR text started working because defer="defer" on the script tag turned off SWFObject completely. I'm assuming that is not the intended result of the defer option. :)
I'll give the 1.5 a try along with it and see what happens.
Well not quite there, but at least I have something to use as a workaround until this gets fixed. Using 1.5 didn't make a difference. However I noticed if I put defer="defer" on the sIFR.js script, the following happens:
* On a page that has a Flash file to be loaded by SWFObject and sIFR text, it works! * On a page that only has sIFR text, it crashes (in IE only) while trying to load the SWF font files ... says in the status bar "downloading file <fontname>.swf", and when I right-click to view the page source, I see this:
There's obviously something going on between SWFObject and sIFR. The sIFR script needs to be deferred on pages where SWFObject is loading a file, but doesn't like to be deferred if SWFObject is not loading a file.
Until there's a solution, I'm going to dynamically create the string for loading sIFR.js so it includes "defer" on pages with SWFObject loads and leaves it out on pages where there are no loads. Of course this is only a problem in IE. :)
Well even the workaround has some issues. If the first page loaded is one that has both SWFObject and sIFR on it, a refresh is necessary. I've turned off the SWFObject and sIFR components for IE for now until we can get more clarity.
instead of calling swfobject as the page loads, try using an extra 'onDomLoad' function to insert all the swfs on the page when the dom is done loading.
Geoff - thanks for the suggestion, but I've decided to use Adobe's Flash Detection Kit instead of SWFObject. With a few adjustments I was able to get it to work on all browsers, as well as handle the 'click here to activate' issue.
Mark Wubben mentioned on the post (http://forum.textdrive.com/viewtopic.php?id=13893) that he's not really sure what's causing the problem either. I would have liked to use SWFObject but I really can't spend any more time looking at it.
As I said to Mark, I really think the two of you should collaborate at some point to figure out what's causing the problem with the newer version of sIFR. I'm sure this isn't the last time someone will be using these two scripts together.