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>
.
精彩评论