A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Opening PDF files using Flash MX

  1. #1
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    Opening PDF files using Flash MX

    I have created a flash projector movie and I have five buttons in this movie, One to open a web browser, One to execute an exe file and three that open PDF files.

    I can not get flash mx to open those pdf files at all and still dont know how to get the exe to launch.
    The action script im putting on the buttons is as follows.

    / Flash

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

    and for the bat file

    @echo off
    start HostingServices.pdf
    exit

    And I do not know how to launch the exe. Can someone help me please?
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  2. #2
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18
    I ran into the same problem and I found a free program that will launch the pdfs.

    It is located at|| http://freemx.arsware.org/

    It comes with a readme file that will explain everthing on how to add it to your projector files. I used it and it works great.

  3. #3
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    got the freeMX

    I must be daft because I can not get it to work for me. Here is what I have done

    on the same level as my Myflashprojector.exe projector file is my autorun.inf
    freeMX.as
    fscommand FOLDER

    In the fscommand folder there are these files
    three pdf files
    freeMX.exe
    and acrobat reader exe installer

    in my flash movie I have the following code on each of my buttons

    on(release) {
    #include "freeMX.as"
    fmxExec("myFile.pdf");
    }

    what am I doing wrong? Did I put the code in the wrong place? Did I put the files in the wrong place?

    Thanks in advance
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  4. #4
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18
    ///FIRST PUT THIS ACTIONSCRIPT IN THE FIRST FRAME OF YOUR FLASH MOVIE

    #include "freeMX.as"



    ///THEN ON YOUR BUTTON PUT:
    on(release) {
    fmxExec("myFile.pdf");
    }

    That should do it...
    If that does not work let me know there may be one more thing.

  5. #5
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    guess what

    That did not work. Are my files in the right place? I thought about giving a more direct path to the fscommand folder. At first I did not even know I needed that folder.

    Thanks for your help
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  6. #6
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18
    -Are you loading any swfs from outside the projector that call the pdfs to open?

    What I mean is the buttons that call the freeMX to open the pdfs are they inside your .fla that is the projector or are the buttons in a loaded .swf from outside the projector?

    -Are you on a Mac? It won't work on a Mac.

    -The Flash6 activeX must be installed. This will already be present on PCs that already can play Flash MX swfs thru their webrowser.

  7. #7
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    flash mx file opener

    I am on a pc and the loader only calls itself. It is the windows projector .exe file that I published. It is a stand alone. Is that bad? I'd send you the files to look at if I could. As far as I can tell they are as they should be. When I click the button it acts like it wants to load but it does not. With the last posting I made does it look as though my files are in the right place or not?

    What I am trying to do is create a cd that will autostart the flashloader.exe and the links within that to open three pdf files and one exe installer. flash 5 could do it with no problem.
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  8. #8
    I don't know how well it works, but I found this a little while ago

    http://www.extendingflash.com/utilities/index.html

    There's a utility called invoke that you can use to run programs and open files in their native applications...

    Might not be any better than what you're already using, though.

  9. #9
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Proxy is a tool I wrote that will let you run BAT files from Flash and avoid the ugly DOS box. The best part? It's absolutely FREE. You can download the utility from www.northcode.com/misc/proxy.zip. There's documentation in the ZIP file, but there was also a big disussion about it (and some other utilities I wrote) in this thread... http://www.flashkit.com/board/showth...hreadid=519274

  10. #10
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18
    That sounds like the same thing I did.

    I think your files are in the right place. Here is how I set mine up:
    ///ON THE ROOT LEVEL
    projector.exe
    freeMX.as
    fscommand(FOLDER)

    ///INSIDE THE FOLDER fscommand
    --------my.pdf
    --------my1.pdf
    --------freeMX.exe
    --------Shockwave_Installer_Full.exe

    ///WHAT DO YOU MEAN BY
    "open three pdf files and one exe installer"
    ///WHAT INSTALLER?

    ///Could you post tour files or send them to me and I could take a look at them for you.

  11. #11
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    files

    I can not get the files to compress small enough to post here so I am not including the projector.exe file nor the freemx.exe file. this is in two parts. I did however change the actionscript to try and open using bat files.
    Attached Files Attached Files
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  12. #12
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    files002

    I can not get the files to compress small enough to post here so I am not including the projector.exe file nor the freemx.exe file. this is in two parts. I did however change the actionscript to try and open using bat files.
    Attached Files Attached Files
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  13. #13
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18

    Fixed it

    ///Here is the Flash file, I changed some code in it and I was able to get the PDF files to open.

    ///You were missing fscommands in the first frame of the movie.

    ///Just publish a projector and create your fscommand folder with your PDFS and freeMX.exe file inside that folder.

    ///And put your freemx.as on the same level as your projector.

    Let me know if it works fro you.
    Attached Files Attached Files

  14. #14
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    Thanks

    I dont know how to thank enough.
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  15. #15
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    Guess what

    for some reason it is not working on my system. Maybe its the version of adobe i have i dont know but i will test it on one of my other computers at home.
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

  16. #16
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    18
    ///When you test it are you using the .exe projector file or just the swf. It will not work with the .swf

    ///What acrobat do you have installed?

  17. #17
    Member
    Join Date
    Jul 2003
    Location
    Kentucky
    Posts
    46

    update

    I have acrobat 5.05 installed. I used this due to most of the possability of my customers still using Win 98. I created the pdf files in 5.0. The auto file which works opens the projector.exe file. I got it to work on another computer. Thanks again for your help.

    I tried associating the pdf file types with 5.05 and it still will not work on my laptop.
    Use no way as way and no limitation as limitation.

    "Bruce Lee"

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