Hi all,
I have several flash files embedded inside a PDF. There is a button in the swf file that i would like to either hide a layer or a button from within the PDF file. I believe i have to use the ExternalInterface.call(); method and I have added the relevant code/import statements in the flash file, the thing i am struggling with is how to add the Javascript inside the parenthesis.
The code below will hide the field in the PDF if it is executed in Acrobat, but when i add it in Flash is throws 3 error messages up!!
function goNow(e:Event):void{
gotoAndPlay(16);
ExternalInterface.call(var remov = this.getField("remov");
remov.display = display.hidden;);
}
Am i missing anything or is the code incorrect?
Any help would be greatly appreciated
a) With callback functions
// The flash AS function triggered by an event
public function goNow():void
{
var myArgument = "test";
ExternalInterface.call("fromAS_myCallback", myArgument);
}// The corresponding JS callback function
function fromAS_myCallback(argMyArgument)
{
// do anything
}b) With eval
// A flash AS function which increments the current pdf page
public function nextPdfPage():void
{
ExternalInterface.call("eval","app.setTimeOut('this.pageNum++;',250);");
}