google-code-export / swfobject

Automatically exported from code.google.com/p/swfobject
1 stars 1 forks source link

Visibility Hidden Problem when placing swfobject library on bottom of the page #428

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Create a HTML Document and implement the swfobject library before the
</body> and use nested objects
2. Register an object with swfobject.registerObject in my case:
swfobject.registerObject('flash-home', '9.0.115', '/_swf/expressInstall.swf');
3. when rendering, swfobject adds a style to the object: "visibility:hidden"

It took me a while to figure it out cause we always put or js on bottom.

Im using Version 2.2 and windows. The problem only occures in some Broser
(like Firefox)

Original issue reported on code.google.com by atrac...@gmail.com on 15 Jan 2010 at 9:39

GoogleCodeExporter commented 9 years ago
I had the same problem (swfObject 2.2) in combination with a jquery (1.3.2) 
document.ready():
$(document).ready(function() {
swfobject.registerObject("flash", "8.0.0", 
"/js/swfOjbect/2.2/expressInstall.swf");
});

This caused the flash movie to be hidden with an inline visibility style... 
After 
moving it out of the document.ready, the error was resolved. It seems that 
swfObject 
and jQuery eventhandles don't mix that well :)

Original comment by robinspe...@gmail.com on 25 Feb 2010 at 10:08

GoogleCodeExporter commented 9 years ago
Similar problem here. I don't have the swfobject on the bottom of the page, but 
I 
embed inside a document.ready callback. This is run before swfobject's own 
callback, 
which sets isDomLoaded to true. This makes swfobject to add an inline style to 
head, 
which causes problems in Chrome when hiding the flash later on.

Using a setTimout(..., 1) around the embed (so it's run last) fixes the problem.

Original comment by gregersrygg on 24 Mar 2010 at 11:16

GoogleCodeExporter commented 9 years ago
swfobject.registerObject() does not need to be placed in a domready event.

invoking swfobject.switchOffAutoHideShow() before embedSWF() will prevent the 
visibility from being modified.

http://code.google.com/p/swfobject/wiki/api#swfobject.switchOffAutoHideShow%28%2
9

Please let us know if this resolves your issue.

Original comment by platelu...@gmail.com on 8 Nov 2010 at 5:59

GoogleCodeExporter commented 9 years ago
switchOffAutoHideShow worked for me when I ran into this.

Is there a way to switchOn?

Original comment by jedier...@gmail.com on 19 Feb 2011 at 12:11

GoogleCodeExporter commented 9 years ago
same problem here. switchOffAutoHideShow worked for me

Original comment by michi.me...@gmail.com on 1 Mar 2011 at 12:10

GoogleCodeExporter commented 9 years ago
Same Problem - switchOffAutoHideShow worked here as well. Thanks so much!

Original comment by frickina...@gmail.com on 6 May 2011 at 7:56

GoogleCodeExporter commented 9 years ago
Issue 537 has been merged into this issue.

Original comment by platelu...@gmail.com on 16 May 2011 at 5:11

GoogleCodeExporter commented 9 years ago
swfobject 2.x was designed to be placed in the document <head>. placing it 
outside of the head will cause problems, including causing the page to fail 
validation. we recommend leaving it in the <head>; if you must place it in the 
body (or wrap it in a domready event) please use 
swfobject.switchOffAutoHideShow() to avoid problems.

Original comment by platelu...@gmail.com on 16 May 2011 at 5:13