Reputation: 11
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
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,
set a callback in flash
ExternalInterface.add_addCallback("the_external_name",a_flash_function);
call the function with javascript
document.getElementById('flashobjectid').the_external_name(param1, param2, etc)
Upvotes: 1