A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 40

Thread: Linking to PDF from EXE file

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    13

    Linking to PDF from EXE file

    how would i link to pdf files from a flash executable?

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Batch file in subfolder "fsommand".

    Read up on "exec" here:

    http://www.macromedia.com/support/fl...projectors.htm

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    hey thanks this is what i'm using

    on (release) {
    fscommand ("exec", "PowerSWF.exe" add chr(9) add "shellex" add chr(9) add "tempest_10_sp.pdf");
    }

    PowerSWF.exe is suppose to launch acrobat and open the pdf file but it doesn't seem to work...any ideas?

    thanks again!

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You didn't read up on my link.
    Can't do it that way anymore! Security reasons.

    Read about the "fscommand" folder necessary to now accomplish this, in my link above.

  5. #5
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    i just read up on it...thanks..

  6. #6
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    so this is what i did

    flash (folder)
    - flash.exe
    - fscommand (folder)
    - powerswf.exe
    - all the pdfs

    action script is

    on (release) {
    fscommand ("exec", "PowerSWF.exe" add chr(9) add "shellex" add chr(9) add "tempest_10_sp.pdf");
    }

    doesn't work...what am i doing wrong? please help?

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    What are "PowerSWF.exe" and "shellex"?
    Are they (also with the .pdf files) in the "fscommand" subfolder?

    And your command line is surely wrong.

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

  8. #8
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    hrm.i didn't write the script someone else did and i'm trying to make it work so i can't tell you what shellex is but powerswf.exe is in the same folder as the pdfs in the fscommand folder

    with this script...

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

    how are the individual pdfs called?

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    To open up a specific file you need to further complicate things and use a batch file. A batch file is simply a text file with commands in it. Thus, normally, if you wanted to open up a specific .pdf file, in it's default opener (depends of file type association on each machine, but would usually be AcroRd32.exe), you would do the following...

    In the projector file:

    on (release) {
    fscommand ("exec", "mypdf.bat");
    }

    Now open up Notepad and create "mypdf.bat" by typing out the following:

    @ echo off
    start tempest_10_sp.pdf
    exit

    Put this .bat file in the "fscommand" subfolder along with the tempest_10_sp.pdf file.

    Test your movie.

    If the .pdf type is associated to AcroRd32.exe on your machine, then it should open it up.

    If you get this working, but get a flash of a black DOS windowbbefore the file opens up, then I'll explain how to possibly get rid of that black window.

  10. #10
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    OH YAY!!

    yes that worked wonderfully...now that dos screen?

  11. #11
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You getting it?

  12. #12
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    yup...that worked. thank you so much!

    did you say you know how to get rid of the flashing dos screen?

  13. #13
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    I ment the DOS window!

    If so, right-click the batch file and hit properties. Under the "Program" tab, make sure the "Run" box is set to "Minimized".
    Apply. Close the window. Test your projector. Shouldn't see that window anymore.

  14. #14
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    yes window...ok am i really dumb? (rhetorical question)

    i don't get a program tab when i right click the bat files.

    i get general, security and summary

  15. #15
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    What OS?

  16. #16
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    windows 2000

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ah!!!!!!

    Figured that'd be your answer. Sorry, I'm on Windows ME, and you'll have to get someone else to answer this one. I remember reading something about it not working with 2000, or something to do with .pif files if I remember correctly.

    Will search to get you an answer.

  18. #18
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    ah. thanks for all your help. i'm just happy that i'm finally getting the pdfs working....

    it would be awesome to get rid fo the dos window but well...it's alright if it's there.

  19. #19
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You could try to use the minimize switch (/m or /MIN) in the batch file.

    Try this:


    @ echo off
    start /MIN tempest_10_sp.pdf
    exit

    Otherwise in all the tabs you do have when you right-click the batch file, don't you have a "Run" box or something about "minimized"?

  20. #20
    Junior Member
    Join Date
    Feb 2003
    Posts
    13
    nope. the tabs i get are general, security, and summary...i haven't found the minimize box yet.

    @ echo off
    start /MIN tempest_10_sp.pdf
    exit

    minimizes the active window...not the dos window.

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