如何将点击从不可见的 div 传播到嵌入的 Flash?
我需要将点击从不可见的 div 传播到嵌入的 flash(两者叠加)。
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="600">
<param name="src" value="pub.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<embed src="flash.swf" bgcolor="#CC0000" wmode="opaque"quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="150"></embed>
</object>
<div id="div"></div>
我的对象都定位得很好,但我确实没有成功地将点击从顶部 div 传输到嵌入的 Flash。
有什么想法吗?
感谢您抽出时间。
i need to propagate a click from an invisible div to an embeded flash (the two are superposed).
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="600">
<param name="src" value="pub.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<embed src="flash.swf" bgcolor="#CC0000" wmode="opaque"quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="150"></embed>
</object>
<div id="div"></div>
My objects are both well positioned, but I really don't succeed in transmitting the click from the top div to the embeded flash.
Any idea ?
Thanks for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
插件事件与 HTML 是分开的。您无法从 Flash 捕获 HTML 点击事件,也无法从 HTML 捕获 Flash 点击事件。
您必须更改
flash.swf
的代码以提供模拟 Flash 影片中的单击的外部方法。例如。使用 dispatchEvent。然后,当单击不可见的 div 时,您可以从 HTML 文档中的 JavaScript 调用此方法。Plugin events are separate from HTML. You can't catch an HTML click event from Flash and you can't catch a Flash click event from HTML.
You would have to alter the code of the
flash.swf
to provide an external method that simulated a click in the flash movie. eg. using dispatchEvent. You could then call this method from JavaScript in the HTML document when the invisible div was clicked.