In last two weeks ago, I have case on my Flash project, using Flash CS5 with Action Script 3.0. I am creating a Flash application of a application tutorials to work on a CD. There is a manual documentation file in PDF format which the user can open the Pdf file.

The PDF file must be open in a separate, stand alone, not inside the flash or internet explorer. In this post I want to share who we can open the psf file in separate window with fscommand!

1. Write this Action Script, here’s my button instance name is "openPdf", and "manual.bat" is the file name of Batch file we want to call to open/execution the pdf file.

    function ():void 
    fscommand ("exec", "manual.bat");


2. Create new folder the name is must "fscommand".

3. Copy the pdf file in folder /fscommand/

4. Open text editing tool, such as Notepad or Notepad++, create new one and type this codes

@echo off 
start name_of_pdf_file.pdf

5. Save the text file as "manual.bat" or any name you like as same as the action script in our flash save it inside /fscommand folder.

6. Publish the Flash Document in Windows Projector (.exe). It would not running properly in swf movie file.

That’s it, but if you have better idea please put it in comment form



you can download the example project file below.

openPdf_example 2.55MB 5665 Example project file
click the attachment link to download the file