简体   繁体   中英

How to capture click event of Flash Object

i have a div which has onclick event... On the Onclick of 1st div it need to call onclick of flash object which is 2nd div..

Is there any thing in java script which captures onclick of flash..

Thanks

You'll need to use ExternalInterface for flash and Javascript to communicate with one another.

It's pretty strait forward.

To send message from Flash to Javascript, use call

ExternalInterface.call("some_js_function",param1,param2, etc);

To call a Flash function from Javascript,

  1. set a callback in flash

    ExternalInterface.add_addCallback("the_external_name",a_flash_function);

  2. call the function with javascript

    document.getElementById('flashobjectid').the_external_name(param1, param2, etc)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM