如何防止 Javascript 菜单隐藏在 Flash 视频 (SWFObject) 下

发布于 2024-07-26 07:19:20 字数 883 浏览 5 评论 0原文

如何防止 Javascript 菜单隐藏在 Flash 视频 (SWFObject) 下。

我正在使用 Open Flash Chart,图表在我的 php 购物车中显示良好,但我的 javascript 菜单隐藏在 Flash Chart 后面。

如何纠正这个问题?

这是我的脚本代码:


<script type="text/javascript">

swfobject.embedSWF(
  "open-flash-chart.swf", "Dashboard_Chart",
  "800", "400", "9.0.0", "expressInstall.swf",
  {"data-file":"ofc-chart.php"} );

</script>

更新(已解决):

我找到了解决方案。

这是我的新代码,可以正常工作并且菜单显示正常。


<script type="text/javascript">
    var flashvars = {};
    var params = {};
    params.wmode = "opaque";
    var attributes = {};
    swfobject.embedSWF("../swf/open-flash-chart.swf", "Dashboard_Chart", "760", "300", "9.0.0", "expressInstall.swf", {"data-file":"ofc-chart.php"}, flashvars, params, attributes );

</script>

How to prevent Javascript Menu from getting hidden under Flash Video (SWFObject ).

I am using Open Flash Chart and the chart is displaying fine in my php shoppping cart, but my javascript menu is getting hidden behind the Flash Chart.

How to correct this problem?

Here is my script code:


<script type="text/javascript">

swfobject.embedSWF(
  "open-flash-chart.swf", "Dashboard_Chart",
  "800", "400", "9.0.0", "expressInstall.swf",
  {"data-file":"ofc-chart.php"} );

</script>

UPDATE (Solved):

I found the solution.

Here is my new code which works and the menu shows up fine.


<script type="text/javascript">
    var flashvars = {};
    var params = {};
    params.wmode = "opaque";
    var attributes = {};
    swfobject.embedSWF("../swf/open-flash-chart.swf", "Dashboard_Chart", "760", "300", "9.0.0", "expressInstall.swf", {"data-file":"ofc-chart.php"}, flashvars, params, attributes );

</script>

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

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

发布评论

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

评论(2

财迷小姐 2024-08-02 07:19:20

尝试将 wmode 参数设置为透明

swfobject.embedSWF("open-flash-chart.swf", "Dashboard_Chart","800", "400", "9.0.0",
   "expressInstall.swf",
   {"data-file":"ofc-chart.php"},
   {"wmode":"transparent"}
);

Try setting the wmode parameter to transparent

swfobject.embedSWF("open-flash-chart.swf", "Dashboard_Chart","800", "400", "9.0.0",
   "expressInstall.swf",
   {"data-file":"ofc-chart.php"},
   {"wmode":"transparent"}
);
两人的回忆 2024-08-02 07:19:20

您需要将 wmode 设置为不透明(或透明)。 这将渲染委托给浏览器并允许 z-index 元素位于 Flash 内容之上。 示例:

<script type="text/javascript">
var flashvars = {};
var params = {};
params.wmode = "transparent"; 
//params.wmode = "opaque"; 
var attributes = {};
swfobject.embedSWF("myContent.swf", "myContent", "300", "120",
    "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script> 

有许多缺点,例如国际化损坏和渲染速度较慢,但​​它会将 Flash 放在您的菜单下。

You need to set the wmode to opaque (or transparent). This delegates rendering to the browser and allows z-index elements to sit above the Flash content. Example:

<script type="text/javascript">
var flashvars = {};
var params = {};
params.wmode = "transparent"; 
//params.wmode = "opaque"; 
var attributes = {};
swfobject.embedSWF("myContent.swf", "myContent", "300", "120",
    "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script> 

Comes with a number of disadvantages, such as broken internationalisation and slower rendering speed, but it will get the Flash under your menu.

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