如何在Flash内容的顶部启用HTML内容,而不降低帧速率? [英] How to enable HTML content on top of Flash content without the frame rate dropping?

查看:158
本文介绍了如何在Flash内容的顶部启用HTML内容,而不降低帧速率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个与Javascript通信的Flash应用程序,以允许更多功能,如自定义HTML输入等,通过在Flash应用程序的顶部放置一个绝对定位的div,并使用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 its 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-索引,因此应该在其上方示出。不幸的是,只有当你将Flash对象的wmode参数设置为transparent时,这只能工作。

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

这个设置的问题是它严重减少应用程序的帧率为不可接受的金额。

The problem with this setting is that it's seriously decreasing the application's frame rate 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).

因此,如何在Flash内容的顶部启用html内容,而不使用transparentwmode参数

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

推荐答案

您可以使用wmode ='opaque',仍然使用z-index'。透明可以很麻烦。

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

这篇关于如何在Flash内容的顶部启用HTML内容,而不降低帧速率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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