开发者

Flash (swf object) on click

开发者 https://www.devze.com 2023-02-05 00:52 出处:网络
I have made a simpl开发者_JAVA技巧e flash button. I want it so that on click = myJSfunction() I tried adding an on click to the div which holds the flash object but the function is never called. What

I have made a simpl开发者_JAVA技巧e flash button. I want it so that on click = myJSfunction()

I tried adding an on click to the div which holds the flash object but the function is never called. What is the correct way to do this?

Thanks in advance


You need to use ExternalInterface to push the flash button's click event out to your javascript function, I think it swallows all clicks otherwise.

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html


This is very similar to onMouseover a flash element?

Add the mouse listener to the flash <object> or <embed> element itself, instead of the <div>.

0

精彩评论

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