Hello,
is there a way to achieve a communication between a pdf embed in a website and the browser's javascript?
I have a flash application running in a pdf and I am trying to embed the PDF in a html website. A click on a hyperlink in the flash file should then open the browser's alert()-function for example.
Is that possible? If so, can you give me example codes?
Greets
First you need a utility function at document level which communicates with doc.hostContainer using the message handler functions. Then your Flash code can call your doc-level function via ExternalInterface.
Note that the hostContainer object isn't present on Mac systems or when a PDF is viewed in desktop mode, and calling into a dead object can cause fun when you're expecting asynchronous responses - so always check the hostContainer object isn't null before using it for anything, and be prepared to handle missing responses.
Look in the JS API docs for examples, under HostContainer.