读书人

flash下监听onclick事件的方法

发布时间: 2012-10-13 11:38:17 作者: rapoo

flash上监听onclick事件的方法

感谢万能的 stackoverflow

在object的内嵌flash上捕捉onclick事件
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.

<div onmousedown="clickBanner(1)"><object><param name="movie" value="3.swf"><param name="wmode" value="transparent" /><embed wmode=transparent allowfullscreen="true" allowscriptaccess="always" src="3.swf"></embed></object></div>



?

读书人网 >Flash

热点推荐