I am having the strangest issue with a site i am developing. On the homepage i have a flash slide show which displays fine in IE. However it does not appear in Firefox but instead leaves a white space.
I am using SWFObject to display the flash. I knows its at least firing as the holding image is removed. However if i right click on the white area i get an HTML context menu not a flash menu which suggests its not even writing the flash object to the page let alone loading the flash SWF file.
If i save the source of the homepage to a static HTML and upload that to the server it works fine.
Could this be anything to do with the file encoding or http headers?
I've tried so many things like removing content, JS, CSS etc. The fact that a static version of the file works but the server driven ones does not is driving me mad.
The server is running Joomla CMS.
The code is:
<script type="text/javascript" src="/scripts/swfobject.js"></script>
<script type="text/javascript">swfobject.embedSWF("/flash/loader.swf", "flashContent", "960", "310", "9.0.0", "/flash/expressInstall.swf");</script>
HTML Code:
<div class="middle" id="flashContent">
<img class="panelBgImage" src="/images/main/Home.jpg" title="Home"/>
</div>
A temporary version of the site can be seen @ / (Available until 06/08/2009)
Thanks in advance
having the script in the head portion of the page certainly fixed it for me. However i have seen problems in the past with flash and firefox and swf. the only way i got around it was to reinstall flash :(
i take it works fine in the other browsers?
I am having the strangest issue with a site i am developing. On the homepage i have a flash slide show which displays fine in IE. However it does not appear in Firefox but instead leaves a white space.
I am using SWFObject to display the flash. I knows its at least firing as the holding image is removed. However if i right click on the white area i get an HTML context menu not a flash menu which suggests its not even writing the flash object to the page let alone loading the flash SWF file.
If i save the source of the homepage to a static HTML and upload that to the server it works fine.
Could this be anything to do with the file encoding or http headers?
I've tried so many things like removing content, JS, CSS etc. The fact that a static version of the file works but the server driven ones does not is driving me mad.
The server is running Joomla CMS.
The code is:
<script type="text/javascript" src="/scripts/swfobject.js"></script>
<script type="text/javascript">swfobject.embedSWF("/flash/loader.swf", "flashContent", "960", "310", "9.0.0", "/flash/expressInstall.swf");</script>
HTML Code:
<div class="middle" id="flashContent">
<img class="panelBgImage" src="/images/main/Home.jpg" title="Home"/>
</div>
A temporary version of the site can be seen @ http://slc.synterax./ (Available until 06/08/2009)
Thanks in advance
having the script in the head portion of the page certainly fixed it for me. However i have seen problems in the past with flash and firefox and swf. the only way i got around it was to reinstall flash :(
i take it works fine in the other browsers?
Share Improve this question edited Feb 3, 2012 at 20:27 jjnguy 139k54 gold badges297 silver badges327 bronze badges asked Jul 27, 2009 at 14:11 Toby MillsToby Mills 1,0162 gold badges10 silver badges13 bronze badges 1- 1 How about some code? Can you show us exactly what you're doing? – Lior Cohen Commented Jul 27, 2009 at 14:23
8 Answers
Reset to default 2I've had a similar issue for the past day and a half, and I've found the answer. The swfobject.embedSWF should be in the HEAD portion of the document (I'm guessing that is not possible for Joomla). If you can't move it there, there is a workaround here. You can add this line of code:
swfobject.switchOffAutoHideShow();
just before your swfobject.embedSWF
Did you try the dynamic method? http://code.google./p/swfobject/wiki/documentation
Also, what is firebug's NET panel telling you? does it show the request for the file? If so what is the server response?
Had the same problem, but one of the answers here helped. Might help someone else.
The registerObject needs to be in the head tag.
My code was putting it there, however... I was writing a debug message to the page before the opening html tag. If you looked at the page source (right click for example), the registerObject was in the head tag.
However, because I was writing a debug message before the registerobject, Firefox was closing the head tag and moving the registerObject to the body. Found this by looking at Firebug which showed different html code layout.
Removed the debug message and it worked. Another hour wasted...
I encountered this using a swf file with WordPress.
The swf file only had a problem within FF 3.5 where it did not load.
I added:
<script src="swfobject.js" type="text/javascript"></script>
to the theme's header.php and it fixed the issue for me, too.
The swf was created using Flash Builder 4.
Oh my goodness. 2-3 hours wasted trying to get swfobject display flash in firefox and I've finally solved it--but not without Armitage's help. The only thing I'd say is that I only ended up having to place the line:
<script src="/Scripts/General/swfobject.js" type="text/javascript"></script>
in the <Head/>
node. The swfobject.embedSWF() line and all the custom code did not need to be located there.
Also--I can't ment at this time (something about a ranking thing)...but I would have if I could. Thanks Armitage! +1
I had the same problem, but it was a MasterPage issue. Phil gave me the clue. I had the following in my tag:
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<script type="text/javascript">
// <![CDATA[
var flashvars = {};
var params = {};
params.wmode = "opaque";
params.scale = "exactFit";
var attributes = {};
swfobject.embedSWF("RainbowWishBackgroundText.swf", "flashTarget", "100%", "870", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
// ]]>
</script>
I changed it to:
<script type="text/javascript">
// <![CDATA[
var flashvars = {};
var params = {};
params.wmode = "opaque";
params.scale = "exactFit";
var attributes = {};
swfobject.embedSWF("RainbowWishBackgroundText.swf", "flashTarget", "100%", "870", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
// ]]>
</script>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
and now it works!
It's so strange! I catch the same problem using registerObject, it is normal in IE but not in FF3.5, wasted 3 more hours, thanks all you guys just put the
<script type="text/javascript" src="http://ajax.googleapis./ajax/libs/swfobject/2.2/swfobject.js"></script>
in head, it will solved.
Including swfobject.switchOffAutoHideShow()
before swfobject.registerObject()
worked for me!
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
swfobject.switchOffAutoHideShow();
swfobject.registerObject("flashAntelope", "9.0.0");
</script>