开发者

swf not transparent + div opacity chrome & opera on osx

开发者 https://www.devze.com 2023-02-14 18:32 出处:网络
Ok i got some weird stuff here I just no clue anymore. First my swf file not going transparent, even when ensure wmode is transparent. non off the browsers is working... the swf is embedded but is no

Ok i got some weird stuff here I just no clue anymore.

First my swf file not going transparent, even when ensure wmode is transparent. non off the browsers is working... the swf is embedded but is not transparent. i even tried removing some params, but still the same... so what's wrong?

<div id="flashContent">

        <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/swfobject.js"></script>
        <script type="text/javascript">


                var flashvars = {};
                flashvars.domain = "*";
                var params = {};
                params.movie = "myflash.swf";
                params.quality = "best";
                params.play = "true";
                params.loop = "false";
                params.menu = "false";
                params.wmode = "transparent";
                params.bgcolor = "#626262";
                params.scale = "noscale";
                params.allowfullscreen = "false";
                params.allowscriptaccess = "always";
                params.allownetworking = "all";
                var attributes = {};
                attributes.id = "myflash";
                swfobject.embedSWF("<?php bloginfo('template_url'); ?>/include/myflash.swf", "flashContent", "100", "100", "10.0.0", flashvars, params, attributes);



        </script>

    </div>

second so i was going to use css to force the div to go transparent using opacity modes. ha, but chrome & opera on the 开发者_高级运维Mac OSX not going opacity at all ><

I even force them using important, and tried all possible codes i know...

-webkit-opacity: 0 !important; -moz-opacity: 0 !important; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important; filter: alpha(opacity=0) !important; opacity: 0 !important;

well any have a clue what i am doing wrong?


It could be because your passing the params object in the wrong spot

swfobject.embedSWF("<?php bloginfo('template_url'); ?>/include/myflash.swf", "flashContent", "100", "100", "10.0.0", flashvars, params, attributes);

Try this:

swfobject.embedSWF("<?php bloginfo('template_url'); ?>/include/myflash.swf", "flashContent", 100, 100, "10.0.0", false, flashvars, params, attributes, false);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号