开发者

Safari WIndows and Transparent Flash

// Edit: The issue now appears to be confined to Safari for Windows.

Around the time Safari for Windows 4 came out I started hearing from users that wmode=transparent was no longer working in Safari.

I have googled this many times but have not come up with any answers. I have tried reducing interference by using tags as opposed to scripts to embed the Flash but with no success.

An example is here: http://hiv411.org/safari.php alternately embedded with script at http://hiv411.org/

All videos use wmode=transparent and are embedded via tags. All work fine in every browser I have except Safari.

Code looks like so on safari.php

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="test" width="289" height="263" align="middle" id="test"&g开发者_JAVA技巧t;
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="swfs/BBattLeft.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />
</object>

Much obliged for any help!


UPDATE: The problem is with the flash player for windows safari but has been solved after Flash Player version 10.0.45.2

Yes, It is only with Safari on Windows! And it's interesting that there is not much written about this on the internet I've been experiencing the same issue, I guessed at first that it has a default value of #FFFFFF for bgcolor and I tried setting it to transparent (not wmode but bgcolor!). it still works in every other browser but it had a green color in Safari (so don't try that! and no the bug is not with the word transparent not being defined! I tried!). Seems that we have to wait for apple to fix it in the next versions but if you want to change the background color if you only have a solid color underneath you can use:

if you're using the adobe script or javascript to display the flash (recommended)

<!--html-->
<script src="[adobe flash detector script]">
AC_FL_RunContent( 'wmode', 'transparent','bgcolor', 'xxxxxx');
</script>
>

else if youre using embed and or for the <noscript>:


 <param name="wmode" bgcolor="#xxxxxx" value="transparent">

...aslo


 <embed wmode="transparent" bgcolor="#xxxxxx">
if you wanna detect safari on windows and not display it - or maybe give the the least zindex:

//Javascript: 
var isSafari = (navigator.userAgent.indexOf("Safari") != -1) ? true : false;
var isWindows = (navigator.userAgent.indexOf("Windows") != -1) ? true : false;
if (isSafari && isWindows) document.getElementById('yourflashid').style.display = 'none';
if (isSafari && isWindows) document.getElementById('yourflashid').style.Zindex = '-1000';
> if you have php it's better to do it with php as changing DOM elements with js makes page load slower and requires javascript

<?php
//PHP
/* i like to make a .php external css style sheet
 (you have to have a transitional HTML document! 
or most browsers will not read it beacuse of difference in MIME types!)*/
function agent($browser) {
$useragent = $_SERVER['HTTP_USER_AGENT'];
return strstr($useragent,$browser);
}
       if(agent("Safari") != FALSE) {
              if(agent("Windows") != FALSE)  { // on windows
?>
#myflash {display:none;}
#verisignflash {z-index:-100; /* for example I already made #000 bgcolor for this and looks right*/
<?php } //All Safari's }

... and then the code for Safari in general as the rest seem to be compatible! however you can add and else statement here and seperat them

If someone finds a better option I will be glad to read it here!


I have the same problem with Safari for Windows. But after I've updated my Flash Player to version 10.0.45.2, the problem is gone. So I think it's a Flash player bug.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜