I've made a movieplayer in flash that has to be embedded in a PDF file. I've also added a closing button, BUT...
It works, on the first page. If I make a (flash)button on another page in the PDF document it doesn't close the floating window. I know that you can close the floating window by clicking on the 'invisible' button in the black frame around the swf, but I want to add a visible (more beautiful) closing button.
Can someone solve my problem?
Thanks!
Use this line of code from the close button in the SWF
ExternalInterface.call("eval","app.setTimeOut('this.getAnnotRichMedia(this.pageNum,\"RM0\").activated=false;',100);");
The setTimeOut fucntion returns right away so the player is happy. Then the deactivation happens outside the context of the call for the RichMedia, making Acrobat happy.
Make sure you get all the quotes right, and the Annot name right. I've got this set up in one of my examples so that when the Rich media annot is setup, it finds it's own name and page number. Then sets them as persistent values. That way nothing needs to be hard coded in the SWF and it can be used on any PDF by just copying the RichMedia annot from one PDF to another.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]