A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Launch PDFs from Projector into Acrobat Reader?

  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    52

    Launch PDFs from Projector into Acrobat Reader?

    Posted this in the newbie forum, but thought I'd post here too.

    Working in Flash 8 on Mac. I'm creating a CD-based PC projector file with links to PDFs. I have been using the getUrl command which opens the PDFs in the default browser. That is unacceptable. The PDFs need to open in Acrobat Reader. In researching this, I've seen threads about combining fscommands (EXEC) with BAT files to get the PDFs to open in the app I choose. I have also seen here mention of Proxy.exe by Northcode. Unfortunately, the threads I've seen which cover this are a few years old.

    I need someone who has done this to chime in. My understanding is that the exec command will open the BAT file which will open the PDF in Reader. The Proxy file will prevent a Windows screen from opening during the process?

    Can anyone make this clear for me and help reduce the thrashing I will receive at the next staff meeting if this function still doesn't work?

    Thanx

  2. #2
    Member
    Join Date
    Feb 2007
    Posts
    52
    Think I found what I need in the standalone applications forum. Will give it a try.

  3. #3
    Member
    Join Date
    Feb 2007
    Posts
    52
    WooHoo, it works. Thanks Northcode.

  4. #4
    Senior Member
    Join Date
    Apr 2000
    Posts
    101

    Hey jheilman

    How did you get it to work? I'm having the same problem..

  5. #5
    Member
    Join Date
    Feb 2007
    Posts
    52
    I have only made it work on a PC, but I'm told using AppleScript and a hybrid CD, it can be truly cross-platform.

    You need to download the proxy utility from Northcode.com. It's free!proxy

    What you do is create a new folder called fscommand that needs to remain in the same directory as your Flash file. Place your PDF and a COPY of the Proxy.exe file in there. Rename the Proxy file the same as your PDF. So, if your PDF is Presentation.pdf, rename Proxy.exe to Presentation.exe.

    Next, you need to create a batch file. I did that in Word. It's just a text file with a .bat extension. In the file you would type START Presentation.exe. Save it as plain text. Place this BAT file in the fscommand folder as well.

    Now, on your button, you enter the following actionscript

    on(release){
    fscommand("exec", "Presentation.exe")
    }

    That's it. What happens when you click the button is the exec command opens the BAT file which in turn launches the PDF in the default application, Reader rather than the browser. The Proxy utility prevents the DOS screen from popping up which would normally occur when you run a BAT file.

    I hope I entered all this correctly, if it doesn't work, the blame is my typing skills. The process is sound. I have 45 PDFs in my presentation and they all work fine.

  6. #6
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    It sounds like you have cracked it, but if its any help i have done the same thing a few times using MDM Zinc except using zinc i can have the pdf actually open within the .exe projector looks really good. i even create a button to close the pdf with in flash.

  7. #7
    Member
    Join Date
    Feb 2007
    Posts
    52
    Call this the no-budget solution

    I have heard of Zinc but not really familiar with it. When you open a PDF within the projector, what features do you have for pan, zoom, page down, etc? Or do you create said features only if you want them? Sounds like it could be a lot or work?

  8. #8
    Junior Member
    Join Date
    Jul 2007
    Posts
    6

    Multiple PDFS

    Do you need to create multiple proxy.exe's renamed with the respective .pdfs and .bats to open multiple pdfs?

    For example,

    I have a flash projector with multiple buttons that open up a pdf or ppt with each button. I've been using the getURL command, but now that i've come across the northcode bit (thank you, btw) it solves that problem. but do I need to go through the repetitiveness of creating multiple proxy.exe and .bat files for each button?

  9. #9
    Junior Member
    Join Date
    Oct 2003
    Posts
    5

    It didn't work!

    I have a projector titled file "SecureBalance.exe" that autoruns once a CD is put into the drive. In this projector file i have a buttton that i am trying to get to launch another projector file titled "Presentation.exe". I am using the following script on the button, but when i press the button it does nothing:

    on(release){
    fscommand("exec", "Presentation.exe")
    }

    Please someone help ASAP!

    Thank You

  10. #10
    Junior Member
    Join Date
    Jul 2007
    Posts
    6
    all the programs your trying to run are located inside a folder called fscommand. (ex. ...mydisc\fscommand\Presentation.exe) That should do it.

  11. #11
    i'm having the same problem, try out the proxy method but don't seem to be working

    here my file
    http://www.dreamance.com/download/testing.zip

    can anyone help?

  12. #12
    Junior Member
    Join Date
    Jul 2007
    Posts
    6
    I noticed that in your fscommand folder the .exe file is labeled as "01_foreword.exe.exe". First rename the file to match: "01_foreword.exe". Second open up the "01_foreword.bat" file and have it say "START 01_foreword.pdf" instead. Save and close. Next, you have to make sure that your code in flash reflects the change. You want the button to call on "01_foreword.exe" (the .exe calls on the .bat file, which calls the .pdf) the code should resemble

    on (release) {
    fscommand("exec", "01_foreward.exe");
    }

    Save and close, that should do it for you. Hope that helps.

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