Javascript function in PDF document

Not sure where to post that so sorry if it’s not the right forum. I’m trying to include a swf in a pdf document with a button in it. I’ve looked at the javascript for pdf documentation but I can’t really make anything work. I’m not sure how to communicate between Flash and pdf. I’ve tried a basic AS2


    getURL("javascript:myfunction();");    

and then in the pdf:

function myfunction()
{
    app.alert("hello")
}

and nothing. Does anyone ever tried that? I need some help if you have some time.
Thank you.

Chris