有没有一种方法可以检测Flash对象上发生的点击(或mousedown,mouseup)?
我试过了:
使用attachEvent/addEventListener将'mouseup','mousedown'和'click'事件附加到Flash对象
直接在Flash对象上附加'onmouseup','onmousedown','onclick'事件内联
从事件'冒泡'切换到事件'捕获'(仅适用于Firefox/Safari)
我需要这个在IE6 +,Firefox 2+和Safari 3+中工作.
谢谢你的帮助!戴夫
我在http://progproblems.blogspot.com/2009/08/javascript-onclick-for-flash-embeded.html找到了这个
1) Set the param wmode to transparent. This allows the object containing the flash to receive the javascript onclick. 2) Use onmousedown insted of onclick. In spite of using wmode transparent, some browsers still wont call the onclick, but they do call onmousedown. The code looks like this:
它适合我的需要=)