onMouseover a flash 元素?

发布于 2024-10-11 03:07:27 字数 191 浏览 6 评论 0原文

我无法弄清楚如何在滚动 Flash 元素时触发 javascript 事件,即使它处于 wmode:transparent 上。

我尝试使用 onMouseover 事件在 Flash 元素上放置一个透明传感器 div,它起作用了,但 Flash 变得无用且完全无法点击。

感谢任何想法。

谢谢

I can't figure out how to fire a javascript event when rolling over a flash element even though it's on wmode:transparent.

I have tried to put a transparent sensor div over the flash element with the onMouseover event and it worked but the flash became useless and totally unclickable.

Appreciate Any ideas.

Thanks

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

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

发布评论

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

评论(2

梦途 2024-10-18 03:07:27

如果您只是在整个 SWF 上寻找简单的鼠标检测,那么这比ExternalInterface 简单得多。

只需定位通过 Javascript 嵌入 SWF 的 标记即可。

document.getElementById("content-banner").onmouseover = over;

function over(evt)
{
 alert("moused over");  
}

http://jsfiddle.net/p7YkA/

This is much simpler than ExternalInterface if you're looking for just simple mouse detection on an entire SWF.

Just target the <object> or <embed> tag that's embedding the SWF via Javascript.

document.getElementById("content-banner").onmouseover = over;

function over(evt)
{
 alert("moused over");  
}

http://jsfiddle.net/p7YkA/

孤君无依 2024-10-18 03:07:27

使用 ExternalInterface 并调用 JavaScript方法从 Flash 调度事件。

Use the ExternalInterface and call a JavaScript method dispatching the event from Flash.

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