onMouseover flash元素? [英] onMouseover a flash element?

查看:124
本文介绍了onMouseover flash元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何在Flash元素上滚动时触发一个javascript事件,即使它在 wmode:transparent 上。



我试图用onMouseover事件把一个透明的传感器div放在闪存元素上,它工作,但闪光灯变得毫无用处,完全无法点击。

欣赏任何想法。



谢谢

解决方案

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



只要定位到< object> < embed> 标记,它是通过Javascript嵌入SWF文件的。

 

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

函数(evt)
{
alert(moused over);
}

http://jsfiddle.net/p7YkA/


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

解决方案

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/

这篇关于onMouseover flash元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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