Adobe Acrobat JavaScript action to launch external media player

Question: I have to create an Adobe Acrobat 9 document full of forms with value validations and buttons. Some buttons must launch an external media player to download and play our video files. These files will be uploaded to our website later. Can a PDF doc launch another app or process or file? Yes. In default case you do not have to write a script. Find the button you want to give a launch action to. Change the “mouse up” option to “Open a web page” instead of “execute a script”. If you need extra validation or want to be sure that certain conditions are met, use Javascript. Find the button of the forms and navigate to Properties -> Actions -> Mouse UP -> Run A Javascript. Enter the code. The javascript for opening up the URL in a new window is as follows:
    app.launchURL("http://www.yoursitehere.com", true);
This launchURL method was introduced with Adobe Reader/Adobe Acrobat version 7. Check for the application version number, and if they’re running pre-7 then call the getURL method.
if(app.viewerVersion < 7)
{
    this.getURL("http://www.mysite.com/mediafile.flv");
}
else
{
    // Download and open in a new window
    app.launchURL("http://www.mysite.com/mediafile.flv", true);
}
Notes: 1. When you get a NotAllowedError error check out the user’s rights. 2. URLs or URIs – Universal Resource Identifiers – can be very simple, or can contain complex information. If the URL does contain complex information, it is absolutely necessary it be formatted correctly when you call launchURL. You can use the encodeURI() JavaScript function to fix the URL :
    var strEncodedURL = encodeURI(strURL);
    app.launchURL(strEncodedURL, true);
3. Since the version 9 Flash player is tightly integrated into Acrobat. Acrobat JavaScript can now communicate directly with ActionScript in Flash. Flash is a highly interactive and diverse environment, whereas Acrobat is largely limited to basic document and form types of interactivity. A good place to start exploring this connection is to create a Flash button that can be used on a PDF.