Transparency of a SWF with wmode = transparent does not work in Firefox [closed]

1

I need to display a SWF with transparency. <wmode = transparent> is working in all browsers, except in Firefox. What can it be?

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="root" align="middle">
<param name="movie" value="root.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#666" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent">          
<param name="scale" value="showall" />
<param name="menu" value="false" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
    
asked by anonymous 15.09.2014 / 18:33

3 answers

1

If you use SWFObject , you'll probably get rid of this problem. This is the recommended way to insert Flash objects into HTML, and is required if you want the SWF and JavaScript to pass information back and forth. You have a embed code generator on the project website.

<html>
<head>
    <title>Usando SWFObject</title>
    <style>
        body {background-color:#c00;}
    </style>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
    <script type="text/javascript">
        // Embed normal
        var flashvars = {};
        var params = {};
        params.quality = "best";
        params.wmode = "transparent";
        var attributes = {};
        swfobject.embedSWF("SEU-SWF.swf", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars, params, attributes);

        // Embed de YouTube
        // https://developers.google.com/youtube/js_api_reference#Embedding
        var yt_params = { allowScriptAccess: "always" };
        var yt_atts = { id: "myytplayer" };
        swfobject.embedSWF(
            "http://www.youtube.com/v/aZMbTFNp4wI?enablejsapi=1&playerapiid=ytplayer&version=3",
            "ytapiplayer", 
            "425", 
            "356", 
            "8", 
            null, 
            null, 
            yt_params, 
            yt_atts
        );            
    </script>
</head>
<body>
    <div id="myAlternativeContent">
            <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>
    </div>
  <div id="ytapiplayer">
    You need Flash player 8+ and JavaScript enabled to view this video.
  </div>
</body>
</html>

JSFiddle

    
15.09.2014 / 19:31
0

You could try

<param name="wmode" value="opaque" />

instead of:

<param name="wmode" value="transparent" />

So I read both have a similar function and can solve your problem.

    
15.09.2014 / 18:48
0

I was able to solve the problem: I just created a <!--[if !IE]>--> and re-specified the vmode to transparent .

    
15.09.2014 / 19:34