在SWF上叠加透明PNG会禁用SWF中的所有点击事件 [英] Overlaying a transparent PNG over a SWF disables all click events in the SWF

查看:205
本文介绍了在SWF上叠加透明PNG会禁用SWF中的所有点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过CSS(绝对定位)在SWF电影上放置透明PNG。但是当我将PNG直接放在SWF上时,SWF上的所有点击操作似乎都被禁用。 SWF要求使用您的网络摄像头,但不能点击任何按钮。请查看此链接的示例。您可以在此找到CSS 此处 png

I'm trying to position a transparent PNG over a SWF movie through CSS (absolute positioning). But when I position the PNG directly over the SWF, all click actions on the SWF seem to be disabled. The SWF is asking to use your webcam, but you can't click any of the buttons. Check this link for an example. You can find the CSS here and the png here.

这就像PNG作为一个叠加的飞机,你不能点击通过。我试过一些透明的属性在CSS和SWF,但没有什么似乎工作。

It's like the PNG acts as a overlaying plane you can't click through. I've tried some transparent properties in both the CSS and SWF, but nothing seems to work. Any ideas/suggestions/experience with this particular situation?

感谢

推荐答案

p>您的怀疑是正确的:PNG位于一个层,位于您的Flash片段的顶部,您不能点击它。

Your suspicion is correct: the PNG is in a layer that's sitting right on top of your Flash piece and you cannot click through it.

由于你只是使用PNG为圆角,为什么不尝试以下:

Since you're just using that PNG for rounded corners, why not try the following:


  1. 创建4个div,每个角落一个

  2. 在您的样式表中,将其设置为绝对定位,将PNG作为背景图片,将background-repeat设置为no-repeat,并显示明确的高度和宽度,即圆角的确切大小。 >
  3. 在每个角落的基础上,使用background-position将该PNG背景滑动到其中。

  4. 将每个角的顶部和左侧属性设置为将它们卡入到位。 (因为div#的角落本身就有绝对的位置,所以它们会坐在正确的位置。)

基本上, a href =http://www.alistapart.com/articles/sprites =nofollow noreferrer> CSS sprites 。

Basically, turn your corners into CSS sprites.

EDIT:您可能仍然会遇到具有显式高度和宽度并充当图层的div#拐角的问题。在这种情况下,你可能想要完全废弃它,并绝对定位角落wrt div#corner的父元素。

You'll probably still run into problems with div#corners having an explicit height and width and acting as a layer. In that case, you might want to scrap it entirely and absolutely position the corners wrt div#corners's parent Element.

这篇关于在SWF上叠加透明PNG会禁用SWF中的所有点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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