Flash / TextField / Safari - 当 wmode 设置为透明时无法在文本字段中输入内容

发布于 2024-12-11 09:33:33 字数 966 浏览 0 评论 0原文

当 wmode 透明时,为什么文本字段在 Safari 中无法正确捕获事件(在 ie/ff/chrome 中没有问题)?我发现的唯一解决方法包括通过外部接口发送 html 表单字段事件到 flash(例如,在 flash 上覆盖 html 表单)。这个问题有一个优雅的解决方案/解决方法吗?

编辑:Swfobject 嵌入代码...

<script>

var swfVersionStr = "10.2.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};

flashvars.swfsPath = "http://domain.com/swfs/";
flashvars.initial_section = "0";

var params = {};

params.quality = "high";
params.bgcolor = "#cfc7c0";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.wmode = (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) ? "transparent" : "opaque";

var attributes = {};

attributes.id = "Loader";
attributes.name = "Loader";
attributes.align = "middle";

swfobject.embedSWF(
    flashvars.swfsPath + "Loader.swf", "Loader", 
    "100%", "100%", 
    swfVersionStr, xiSwfUrlStr, 
    flashvars, params, attributes); 

swffit.fit("Loader", 980, 726);

</script>

Why are text fields not catching events properly in Safari when wmode is transparent (no problems in ie/ff/chrome)? The only workarounds I've found involve sending html form field events to flash through an external interface (eg. overlaying html form on flash). Is there a graceful solution / workaround to this problem?

Edit: Swfobject embed code...

<script>

var swfVersionStr = "10.2.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};

flashvars.swfsPath = "http://domain.com/swfs/";
flashvars.initial_section = "0";

var params = {};

params.quality = "high";
params.bgcolor = "#cfc7c0";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.wmode = (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) ? "transparent" : "opaque";

var attributes = {};

attributes.id = "Loader";
attributes.name = "Loader";
attributes.align = "middle";

swfobject.embedSWF(
    flashvars.swfsPath + "Loader.swf", "Loader", 
    "100%", "100%", 
    swfVersionStr, xiSwfUrlStr, 
    flashvars, params, attributes); 

swffit.fit("Loader", 980, 726);

</script>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奢欲 2024-12-18 09:33:33

这是一个很长一段时间以来的已知问题...我在洛杉矶的 MAX 大会上与 Adob​​e 进行了交谈,他们已经意识到了这一点,但目前没有计划修复它...抱歉,伙计

this is a known problem for a long time... I spoke to Adobe at the MAX Convention in LA and they are aware of it but no plans at the moment to fix it... sorry buddy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文