如何实现对Flash内容上面的html内容,而无需使用"透明" wmode参数或如何使用时,优化帧率的"透明" wmode参数的Flash对象吗?透明、参数、内

2023-09-09 21:46:24 作者:月归野樵

我正在开发Flash应用程序是用Javascript的沟通,让更多的功能,如自定义HTML输入等,通过把一个绝对定位的div上的Flash应用程序的顶部,并控制它的位置等与Flash和放大器; Javascript的。

I'm developing a Flash application which is communicating with Javascript to allow more features such as custom html input etc., by placing an absolute positioned div on top of the flash application and controlling it's position etc. with Flash & Javascript.

由于这些HTML元素都出现的上方的Flash内容,我想通了以下基本的CSS就足以达到目的:

Because these html elements have to appear above the flash content, I figured the following basic css would be enough to do the trick:

#flashContent {
                position: absolute;
                left: 0px;
                top: 0px;
                z-index: 0;
            }
            #htmlContent {
                position: absolute;
                left: 200px;
                top: 200px;
                z-index: 1;
                width: 200px;
                height: 200px;
                background-color: yellow;
            }

所以,htmlContent具有较高的z-index比Flash内容,因此它应该是如上图所示。不幸的是,这似乎只当您设置Flash对象的的wmode参数合作,透明的。

So, the htmlContent has a higher z-index than the flash content and thus it should be shown above it. Unfortunately, this only seems to work when you set the Flash object's "wmode" parameter to "transparent".

使用此设置的问题是,它的seriousely降低应用程序的帧速率到​​无法接受的金额。

The problem with this setting is that it's seriousely decreasing the application's framerate to an unacceptable amount.

有关静态内容这似乎不是一个问题,但是我的应用程序出现的各种元素,你可以拖动周围已被移动的实时(同时移动鼠标)。

For static content this does not seem to be a problem, however for my application there's all kinds of elements that you can drag around which have to be moved real-time (while moving the mouse).

所以,我怎么能对闪存内容之上的HTML内容,而无需使用透明wmode参数的或的如何优化使用透明wmode参数时,帧率?

So, how do I enable html content on top of flash content without using the "transparent" wmode parameter or how do I optimize framerate when using the "transparent" wmode parameter?

推荐答案

您可以使用的wmode ='不透明',并且仍然使用Z-index'ing。透明是非常马车。

You can use wmode = 'opaque', and still use z-index'ing. Transparent can be very buggy.