A Flash Developer Resource Site

Results 1 to 20 of 33

Thread: opening pdf files on top of interface

Hybrid View

  1. #1
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Here's a BAT file that will make sure the Acrobat Reader is made the topmost application after your PDF file is opened. It uses a BAT file for loop to repeatedly call topmost so the PDF has time to load. In the BAT file in the ZIP file I attached there are a lot more X's which translates into a better chance of topmost working.
    Code:
    start test.pdf
    set repeat=x x x x x x x x x x x x x x x x x x x x x 
    for %%i in (%repeat%) do call topmost Adobe
    In the ZIP file I also included a file called test.exe which is a renamed copy of my PROXY utility to hide the ugly DOS box that appears when you run a BAT file.

    Put everything in the ZIP file in the fscommand folder, then if you want to just run the BAT file you can just add fscommand("exec", "test.bat"); to your FLA.

    If you use fscommand("exec", "test.exe"); you'll be using the proxy utility to launch the BAT file indirectly. What this does is hide the DOS box that appears when you run a BAT file.

    If you want to open other PDF files, just make copies of TEST.BAT and TEST.EXE and rename them to say MYFILE.BAT and MYFILE.EXE and edit MYFILE.BAT to open the correct PDF file. Then use fscommand("exec", "myfile.exe") to open the PDF.

    You'll need a BAT and EXE file for each PDF file you want to open.

    Clear as mud right?

    If you have any questions, just shout!

    Note: This would be a one liner (of ActionScript) in SWF Studio
    Attached Files Attached Files
    Last edited by Northcode; 02-22-2006 at 01:21 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center