swfobject - Flash loads twice workaround? -


While examining the problem of a report with slow loading of my site, I came to a point where I noticed (via firebug) that my flash file was loading twice.

After some investigation I tracked it down with the use of SWFObject 2.0.

Now, I saw on the thread that someone said that FYI can solve the problem: FYI, if you are a webpage developer then your page is easy to work with FF3 The solution is to delay the reach of any plug-ins until your page is fully loaded. An easy way to do this is to use the window.setTimeout using your plugin scripting code by using a pending browser event after the expiration of zero.

Honestly, I am repeating and hoping that someone can give me a code example that will work.

Do you know one way to do this work, and how will the code look? Any help would be highly appreciated!

  & lt; Script & gt; Function loads () {swfobject.registerObject ("myobj", "9.0.0"); } Function init () {window.setTimeout ("loadswf ()", 0); } & Lt; / Script & gt; & Lt; Body onload = "init ()" & gt; & Lt; Object class = "clayed: D27CDB6E-AE6D-11cf-96B8-444553540000" width = "778" height = "198" id = "myobj" & gt; & Lt; Param name = "movie" value = "style. Swf" & gt; & Lt; Param NAME = FlashVars VALUE = "url = {{stylist}}" & gt; & Lt ;! - [if! IE]> - & gt; & Lt; Object type = "app / x-shock wave-flash" data = "style. Swf" width = "778" height = "198" & gt; & Lt; Param name = "flashvars" value = "url = {{stylist}}" & gt; & Lt; -! & Lt; [Endif] - & gt; & Lt; A href = "http://www.adobe.com/go/getflashplayer" & gt; & Lt; Img src = "http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt = "Get Adobe Flash Player" / & gt; & Lt; / A & gt; & Lt ;! - [if! IE]> - & gt; & Lt; / Object & gt; & Lt; -! & Lt; [Endif] - & gt; & Lt; / Object & gt;  

Comments