开发者

How to propagate a click from an invisible div to an embeded 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 ?开发者_如何学Python

Thanks for your time.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜