fullcatrooms / swfobject

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

SWFObject delay in loading flash video, even with static publishing #322

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a page with reference to external assets (such as google analytics).
2. Load a static publishing flash movie.
3. Notice that there is a noticeable delay in loading the flash movie vs
when javascript is disabled and flash movie loads instaneously.

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

Should be an option to disable waiting for the entire DOM to load before
loading the flash file. 

What version of the product are you using? On what operating system?

2.1 on windows.

Please provide any additional information below.

Original issue reported on code.google.com by eriksat...@gmail.com on 8 Jun 2009 at 2:39

GoogleCodeExporter commented 9 years ago
FYI - Here is the code used:

<script type="text/javascript">
    swfobject.registerObject("flashMovie", "7.0.0");
</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" 
height="440"
id="flashMovie" name="home" style="display:block">
    <param name="movie" value="/flash/index.swf" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="menu" value="true" />
    <param name="quality" value="high" />
    <param name="scale" value="showall" />
    <param name="wmode" value="window" />
    <param name="bgcolor" value="#000000" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="sameDomain" />
    <param name="FlashVars" value="<?=$flashVars?>" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="/flash/index.swf" width="800"
height="440">
        <param name="play" value="true" />
        <param name="loop" value="true" />
        <param name="menu" value="true" />
        <param name="quality" value="high" />
        <param name="scale" value="showall" />
        <param name="wmode" value="window" />
        <param name="bgcolor" value="#000000" />
        <param name="allowfullscreen" value="true" />
        <param name="allowscriptaccess" value="sameDomain" />
        <param name="FlashVars" value="<?=$flashVars?>" />
    <!--<![endif]-->
<div style="background-color: #000000; width: 800px; height: 440px;"><p 
style="color:
#FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px;
font-weight: bold;">Please download the latest version of the flash player to 
view
this website.</p>
<p style="color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px; font-weight: normal;">Flash player can be downloaded at the
following website:</p>
<p><a style="color:#CC0000;font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px; font-weight: normal;" 
href="http://www.adobe.com/go/getflashplayer"
target="_blank">Go Get Flash Player</a></p>
</div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
</object>

Original comment by eriksat...@gmail.com on 8 Jun 2009 at 2:53

GoogleCodeExporter commented 9 years ago
Your assumptions are wrong, this is not a bug.

Static publishing uses HTML rendering to display Flash content, so as soon as 
your
tag is read by the browser it already starts loading your SWF. However, 
SWFObject
uses dynamic CSS to hide your SWF until it has completed its tests whether or 
not a
visitor supports the correct Flash version, after which it either shows 
alternative
content or displays the SWF. 

From SWFObject 2.2 onwards you can choose not to use this automatic hide/show
mechanism with: swfobject.switchOffAutoHideShow(); This is still undocumented, 
some
more info on this:
http://code.google.com/p/swfobject/issues/detail?id=277&can=1&q=switchOffAutoHid
eShow

So I guess what you are really looking at here is JavaScript code execution 
order. If
you would like to discuss this further, please use the discussion group:
http://groups.google.com/group/swfobject

Original comment by bobbyvandersluis on 8 Jun 2009 at 8:30