LuisNeighbur / swfobject

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

jQuery onready and registerObject don't play nice. #537

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Embed static object tags in HTML
2. use jQuery onready event to register the object with swfobject
3. Flash works sporadically in IE

What is the expected output? What do you see instead?
flash should work but it doesn't, sometimes it shows up and works fine, 
sometimes it loads and then disappears after a couple millisecs and sometimes 
nothing at all...

What version of the product are you using? On what operating system?
swfobject 2 on IE8, WIN7

Please provide any additional information below.

When removing the registerobject call from the onready event and calling it 
from outside everything works fine.

Original issue reported on code.google.com by ezra....@gmail.com on 17 Feb 2011 at 11:47

GoogleCodeExporter commented 9 years ago
swfobject.registerObject doesn't need to be placed in a domready call; it's 
designed to be placed in the head, outside of a domready or onload event (see 
the examples at 
http://learnswfobject.com/http://learnswfobject.com/the-basics/using-javascript-
with-static-publishing/)

The appearing/disappearing you describe sounds like swfobject's CSS handling 
(showing/hiding the SWF). If you wish to turn off swfobject's CSS handling, set 
swfobject.switchOffAutoHideShow() before using swfobject.registerObject.

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

GoogleCodeExporter commented 9 years ago
merging into issue 428, as they both deal with CSS issues when placing 
swfobject outside of the document's <head>. In both cases the issue can be 
avoided by invoking swfobject.switchOffAutoHideShow()

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

GoogleCodeExporter commented 9 years ago
I should explain myself better.  I'm merging the 537 into 428 because they both 
deal with CSS issues caused by using swfobject in an unexpected way:

428 deals with CSS issues that occur when placing swfobject outside of the 
document's <head>.

537 occurs when placing swfobject.registerswf in a domready statement.

In both cases, SWFObject was not designed to be used the way the posters used 
it.

Original comment by platelu...@gmail.com on 16 May 2011 at 3:18