Safari浏览器窗口和透明Flash [英] Safari WIndows and Transparent Flash

查看:276
本文介绍了Safari浏览器窗口和透明Flash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//编辑:现在的问题似乎仅限于Safari浏览器的Windows

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

随着时间推移,Safari浏览器的Windows 4出来后,我开始从用户听到的wmode =透明不再在Safari工作。

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

我用Google搜索了很多次,但都没有拿出任何答案。我曾尝试降低干扰通过使用标签,而不是脚本嵌入闪存,但没有成功。

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.

一个例子是在这里: http://hiv411.org/safari.php 交替嵌入脚本在 http://hiv411.org/

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

所有视频使用的wmode =透明,并通过标签嵌入。所有做工精细在每个浏览器我有,除了Safari浏览器。

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

code看起来像等safari.php

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">
<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!

推荐答案

更新:的问题是与Flash Player的Windows Safari浏览器,但之后的Flash播放器版本已经解决了10.0.45.2

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

是的,这是只与Windows上的Safari!  而有趣的是,没有太多写这个互联网,我一直在经历着同样的问题,我猜在第一,它具有#FFFFFF的BGCOLOR一个默认值,我试图将其设置为透明(没有的wmode但BGCOLOR !)。它仍然工作在其他浏览器,但它有一个绿色在Safari(所以不要尝试!且没有错误是不符合的话透明没有被定义的!我试过!)。 看来,我们必须等待苹果修复它在未来的版本,但如果你想改变背景颜色,如果你只有一个纯色下,你可以使用:

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:

如果您使用的是土坯脚本或JavaScript来显示闪光灯(推荐)

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>

&GT;

否则,如果采用内嵌式设计,或在&lt您选择; NOSCRIPT&GT;

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


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

... aslo

...aslo


 <embed wmode="transparent" bgcolor="#xxxxxx">

如果你想检测到Windows上的Safari,而不是显示它 - 或者给予最不zIndex的:

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';

&GT; 如果您对PHP这是更好地用PHP做的改变DOM元素的JS使页面加载速度较慢,需要JavaScript

> 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 }

...然后,一般为其余的code的Safari浏览器似乎是兼容!然而,你可以添加在这里else语句和seperat它们

... 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!

这篇关于Safari浏览器窗口和透明Flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆