Answered
Hi all,
I have a swf embedded into a pdf and I would like to change my pdf page from flash.
here is my javascript code inside the pdf:
//<Document-Level> //<ACRO_source>gotoPage()</ACRO_source> //<ACRO_script> /*********** belongs to: Document-Level:gotoPage() ***********/ function gotoPage(page) { console.println("Going to: " + page) this.pageNum = page; } //</ACRO_script> //</Document-Level>
here is my actionScript code inside flash:
g2_btn.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ ExternalInterface.call("gotoPage",3); });
I can see from the javascript debugger that it is calling the function, but then acrobat crashes...
any help would be appreciated...
thanks
There is a workaround in the meantime. Take a look at this blog: http://blogs.adobe.com/pdfdevjunkie/2008/09/how_do_you_close_a_floating_ri.php
He was working a similar issue, trying to close an annotation in a floating window from a button in a SWF. Try taking the code snippet from the blog I pasted below and replace “rm = this.getAnnotsRichMedia(0)[0]; rm.activated=false;” with the Javascript call you want.
ExternalInterface.call( "eval", "app.setTimeOut('rm = this.getAnnotsRichMedia(0)[0]; rm.activated=false;',250);");