My favorites | Sign in
Project Logo
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
New issue | Search
for
| Advanced search | Search tips
Issue 327: swfobject 2.2 fails on Firefox 3.5 beta
12 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by jeichels, Jun 18, 2009
What steps will reproduce the problem?
1. Upgraded the my working 2.1 swfobject to 2.2.
2. swfobject_generator_1_2_html created the same code as used with the 2.1
release.
3. Drew the page in Firefox 3.5 beta.  Mozilla/5.0 (Windows; U; Windows NT
6.0; en-US; rv:1.9.1) Gecko/20090615

What is the expected output? What do you see instead?

Expected to see same exact flash output as in 2.1.  Instead saw the flash
show up very briefly then go blank.  The working 2.1 version is found on
the http://jobbank.com front page.

When I look at the 2.2 output on IE 8.06, it looks fine.  When I back off
the same exact code back to the 2.1 version it also looks fine in the
FireFox 3.5 beta.

What version of the product are you using? On what operating system?
2.2 on Windows Vista.

Please provide any additional information below.


Comment 1 by bobbyvandersluis, Jun 19, 2009
SWFObject 2.2 works fine in Firefox 3.5.

What do you if you look at the test suite:
http://code.google.com/p/swfobject/wiki/test_suite

In any case you should move your SWFObject script blocks to the head of your HTML
file, and if this is not possible, move it to a point before where your object
element is inserted.


 
Comment 2 by jeichels, Jun 19, 2009
Will look at what you suggest, but if I just change my code from 2.1 in the code you
were looking at to 2.2, it fails.   Perhaps this is because of location, but it
didn't used to fail.

Thank you for your help and ideas on moving the code above.
Comment 3 by jeichels, Jun 19, 2009
I just placed the line below above the Flash code.

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

As before, It worked for this 2.1 swfobject version.  When I just changed the number
2.1 to 2.2 above, it failed.  Again this only occurs in FireFox 3.5 version shown above.

To just test this in a different way and environment, I just did the single digit 2.1
to 2.2 change in production's http://jobbank.com and it failed exactly the same way.

Sorry for the trouble.  We can just stay on 2.1.  There are no JavaScript or other
errors shown.



Comment 4 by bobbyvandersluis, Jun 20, 2009
And you the Flash moovies in the 2.2 test suite, are they displayed correctly?
Comment 5 by jeichels, Jun 20, 2009
It seems all of the test suit items may have run successfully.  I was not sure on one
of them, as I got the following message when a first element drew:

e.success = false
e.id = myId1
e.ref = undefined

at this link: 
http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_multiple2.html

When I clicked OK, the next elements seemed to draw correctly.  This same message,
however, also appeared in the most recently patched IE.







Comment 6 by bobbyvandersluis, Jun 22, 2009
RE: I got the following message when a first element drew

That's correct, because Flash 11 hasn't been released yet.

I think that in your web page your Flash is drawn correctly, however it's a CSS
redrawing issue in Firefox. In SWFObject 2.2 you can turn the default show/hide off:

swfobject.switchOffAutoHideShow()

Disable SWFObject's default show/hide behavior (SWFObject 2.2+). 

Ensure to call swfobject.switchOffAutoHideShow() after you have included the
SWFObject library, but before any swfobject.registerObject() or swfobject.embedSWF()
calls, like ( http://code.google.com/p/swfobject/wiki/api ):

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.switchOffAutoHideShow();
swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
</script>

If it then renders correctly, it's probably a Firefox redraw issue.

Also, if you have Firebug or the DOM inspector installed, you could check how the DOM
elements and dynamic styles are finally rendered. What's the object blurb look like
in here?


Comment 7 by bobbyvandersluis, Jun 23, 2009
(No comment was entered for this change.)
Status: Invalid
Comment 8 by alheureux, Jul 06, 2009
I experienced this same issue, adding switchOffAutoHideShow(); fixed the problem.

This is an issue with the -release- build of Firefox 3.5. Looks like SWFObject is gonna need another update...
Comment 9 by bobbyvandersluis, Jul 07, 2009
Well, it's a Firefox rendering issue to be precise and it sometimes occurs; it really
depends on the specific contents of your Web page. We will investigate if we can
force Firefox to redraw to workaround this.
Status: Accepted
Comment 12 by ya_ku_...@hotmail.com, Jul 21, 2009
(No comment was entered for this change.)
MdfPluginArchive.txt
23.8 KB   Download
Comment 13 by citznfish, Jul 22, 2009
Just an FYI, I am experiencing this issue with 2.2 and FF 3.0.7

and adding swfobject.switchOffAutoHideShow(); definitely fixed my issues in FF.

Comment 14 by vep.crl, Jul 22, 2009
Just as an aside, we've been discussing this issue in SWFObject forums; one thing
that I noticed during my tests is that using the switchOffAutoHideShow() method is
not necessary if all the SWFObject code is in the head of the document.  This implies
that there might be some rendering/race condition that can be prevented by wrapping
the SWFObject calls in another type of domready event.  But pushing code that didn't
work for FF3.5 into the head definitely cures the issue (at least for me)
Comment 17 by andfinally, Jul 31, 2009
We were also getting this 2.2 problem with FF 3.0.6 and FF on OSX - with the script 
link in the body, even before the content, nothing rendered. Needed AutoHideShow, so 
went back to 2.1 and now works fine.
Comment 18 by cosmos53076, Sep 03, 2009
Thank you,bobbyvandersluis!I had solved this troubled problem with your help.
Comment 20 by matt.mlw26, Sep 03, 2009
I am seeing errors in FireFox 3.5.2.

Firebug is showing this error:
Error calling method on NPObject!
[Break on this error] var swfobject=function(){var
D="undefine...lay="block"}}if(E){E(B)}}a=false}}}}();\n

Seeing this same error with the test documents provided in the download.
Comment 21 by alexan...@mindey.se, Sep 23, 2009
I had the same problem in both Safari and Firefox. 

I loaded the swfobject.js file dynamically using ajax, (after pageload). When the .js file is loaded I activate SWF 
object (registerObject).

Without swfobject.switchOffAutoHideShow() I see nothing (or a short flash of content). Adding 
swfobject.switchOffAutoHideShow() before registerObject fixed  the problem.

Since dynamic loading of javascript libraries is quite common it would be nice to have swfobject working in 
these kinds of contexts.
Comment 22 by tlatenc...@yahoo.com, Oct 02, 2009
I've been having problems with FireFox 3. Whenever I choose the width and height to
be 100% it simply doesn't display. It works fine in Safari.
Comment 23 by po_b...@grannet.net, Oct 06, 2009
I've also notice in my testing that the client callback function is never invoked 
when using static publishing on Firefox 3.5. Dynamic publishing seems to work just 
fine though. So for my intents, swfobject.switchOffAutoHideShow() fixes half of the 
issue, is there something in the API that can resolve the client callback issue?

Thanks, Bobby!
Comment 24 by aran.rhee, Oct 11, 2009
@#22 - Read FAQ#1 and use the mailing list for authoring questions
Comment 25 by mariusdragne, Oct 13, 2009
Hi, i have a problem with swfobject. Since yesterday all the sites that use version
2.2 are not showing swf's anymore on firefox for mac os x. Can you give me hint how
to solve this? Thank you.
Comment 26 by davidhealy, Oct 14, 2009
I'm also having this problem. Only happens on Firefox 3.5 with swfObject 2. Only
started happening recently. Very annoying. Can't find a solution anywhere.
Comment 27 by abhmartineau, Oct 14, 2009
I have the same problem, I cannot see any Flash when I use Static or Dynamic
Plublishing using the SWFObject 2 AIR Generator.

I tried adding the swfobject.switchOffAutoHideShow() code but it did not work.

The strange thing is that I see the Flash fine when I test locally but only don't see
it when its online. Any ideas?

I'm using Firefox 3.5.3 Mac
Comment 28 by aran.rhee, Oct 14, 2009
@all - please using the mailing list for authoring questions. Anything expect for 
actual bug submissions will be ignored (or marked as invalid) here.
Comment 29 by romain.l...@gmail.com, Oct 15, 2009
I have the same issue than #25, #26, #27 :
since two days, all the sites that use version 2.2 are not showing swf's anymore on
firefox for windows.
Comment 30 by aran.rhee, Oct 15, 2009
If anyone's sites have stopped working recently, it is due to a Flash player upgrade on 
your own machine (most likely a corruption of the flash player during the upgrade 
process). It has nothing to do with SWFObject as the code has not changed!
Comment 31 by choussamaster, Oct 29, 2009
I have the same probleme :(
Comment 32 by ajsimo1, Nov 04, 2009
i am on firefox 3.5.4 and the "workaround" does not work for me at all.  it works
fine in safari, but not firefox.  i am on a MAC also, not sure if that matter.  my
flex generated code (while ugly and ridiculous in length) work fine... i was really
hoping to get away from that :(
Comment 33 by adam.albrechtas, Nov 17, 2009
I have found that Firefox does not like it if you use percentage height or width in
the swfobject.embedSWF() call.

This works:
swfobject.embedSWF( "movie.swf", "container", "200", "200", "9.0.0");

While this doesn't:
swfobject.embedSWF( "movie.swf", "container", "100%", "100%", "9.0.0");
Comment 34 by aran.rhee, Nov 18, 2009
@#33 - read the FAQ page entry #1 - reading the documentation before posting a "bug" 
report is really a good idea.
Comment 35 by wolped, Dec 11, 2009
This may be relevant. Or maybe it's a new bug. Please let me know if you'd like me to
post it as such.

I found that when creating a simple TextField in a SWF, it would sometimes resize
itself to 100 x 100 (the default size of a textfield) after I refreshed the page. (It
looked fine on initial load.) This was occurring in FF both on mac and windows, as
well as in IE 8.

When I removed stage.stageWidth and stage.stageHeight (I had been setting the size of
the textfield relative to those two) and instead designated pixels, the problem went
away. 
Comment 36 by zetlan, Dec 14, 2009
Having the same problems as everyone else, it appears, and swfobject.switchOffAutoHideShow() does not work.  
There's just no effect at all.  Using Firebug, it appears that the object exists -- replacement is happening 
correctly -- but is 0 pixels wide, 16 pixels tall.

Ran the test at http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic2.html, which produces 
correct output in Safari, but in Firefox it calls the callback (success=true) and produces no visible output.

This is Mac OS X, 10.6.2, Firefox 3.5.5, SWFObject 2.2.
Comment 37 by mitch.redmond, Jan 06, 2010
Fixed it. The Google generator adds a generic div around the objects. I added an ID
and gave it a width and height of 100% and also defined the html, body with the same
width and height of 100%. Now it shows up in Firefox on Mac.

Here is the code, ALL of it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>SWFObject 2 static publishing example page</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<script type="text/javascript" src="js/swfobject.js"></script>
		<script type="text/javascript">
		swfobject.registerObject("myId", "10.0.2", "js/expressInstall.swf");
		</script>
		<style type="text/css" media="screen">
			html, body {
				background: #fdba13;
				border: 0;
				height: 100%;
				margin: 0;
				padding: 0;
				width: 100%;
			}
			#wrapper {
				background: none;
				border: 0;
				height: 100%;
				margin: 0;
				padding: 0;
				width: 100%;
			}
		</style>
	</head>
	<body>
		<div id="wrapper">	
			<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="100%" height="100%" align="top">
				<param name="movie" value="mysupercoolflashvideothingy.swf" />
				<param name="wmode" value="transparent" />
				<param name="scale" value="noscale" />
        		<!--[if !IE]>-->
				<object type="application/x-shockwave-flash"
data="mysupercoolflashvideothingy.swf" width="100%" height="100%" align="top">
					<param name="wmode" value="transparent" />
					<param name="scale" value="noscale" />
				<!--<![endif]-->
				<div>
					<h1>Alternative content</h1>
					<p><a href="http://www.adobe.com/go/getflashplayer"><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" /></a></p>
				</div>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>
	</body>
</html>

Hope this helps.
Sign in to add a comment

Hosted by Google Code