Venkat
Venkat

Reputation: 11

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

Upvotes: 1

Views: 693

Answers (1)

Ben
Ben

Reputation: 21249

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)

Upvotes: 1

Related Questions