A Flash Developer Resource Site

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

Thread: Launching .exe file in flash MX

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    Heya all, after searching thru the forum archives on launching an external application with Flash MX, I'm still stumped. Here is what I'm trying to do:

    I'm trying to launch an .exe file from a swf file (it will ultimately be a projector file on a CDROM).

    The file is called "PPView97.exe", and it resides in the "fscommand" folder.

    The swf file is located one folder up from the fscommand folder, and here is what the code for my button looks like:

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


    I've also tried this:

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

    And neither of them seem to work.

    I'm fairly experienced in Flash, and had no trouble doing this in ver.5.

    Any help, ideas, or suggestions will be incredibly helpfull (so I can finally get this project out the door!).

    Thanks in advance everyone!

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    *bump*

    anyone?

  3. #3
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    Working OFFLINE, in a standalone SWF or EXE, right?

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    Thanks for the reply!

    It's not going to be online, all the files are resident in a folder on my local pc.

    And I'm just using trying to get it to work as a .swf file first. Though eventually it will be a projector file when its completed.

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    5

    Post [ try... ]

    try using getURL("temp.exe","_blank");

    it does however ask you if you want to open/save file as

  6. #6
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    Don't try launching it from within Flash MX. Open the SWF outside of Flash MX.

  7. #7
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439

    Re: [ try... ]

    Originally posted by the_lemur
    try using getURL("temp.exe","_blank");

    it does however ask you if you want to open/save file as
    No, fscommand will work.

    If you still can't get it to work, try http://www.macromedia.com/support/fl...ctors.htm#Exec (click on exec)

  8. #8
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    Thanks again for the replies!

    Alright, still not working.

    I've tried actually opening the .swf file seperately(not when I'm in the MX program), then clicking the link, and still not working.

    I've also checked that link on the macromedia site previously, and I seem to be doing everything exactly the same way as them.

    Any other suggestions?

  9. #9
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    It should work just how it is but try:

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

    It should work with out the fscommand\ there, but who knows. And I can't help you anymore, to tired (been up 21+ hours).

  10. #10
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    When I put the directory it resides in, it still doesn't work.

    Thanks for your help and get some rest!

  11. #11
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    *bump*

    Still stumped, anybody else have any thoughts?

  12. #12
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    *bump-a-roo*

  13. #13
    Junior Member
    Join Date
    May 2002
    Posts
    25

    just incase you missed it...

    The exec command is used to launch an external application.

    In Macromedia Flash MX the external application must be in a subfolder named 'fscommand'. This subfolder must be in <BOLD>the same directory</BOLD> as the projector which uses the fscommand action. This security restriction helps prevent malicious use of the exec option.


    [Edited by product247 on 06-12-2002 at 10:11 AM]

  14. #14
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    We already covered that above.

    I am thinking the file name isn't correct, you don't have it in a subfolder called fscommand, or the SWF is within a HTML page.

  15. #15
    Junior Member
    Join Date
    May 2002
    Posts
    25

    Is it in the same directory ??

    Are both the files in the same folder.???? It probably wont work unless they are!!! Security Feature in MX....


    From reading the first post and all the others Im seeing that the file is in a seperate folder.....maybe thats the problem!!

  16. #16
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    The EXE he is trying to launch has to be in a seperate folder called fscommand

  17. #17
    Junior Member
    Join Date
    May 2002
    Posts
    25

    I know ,.....

    Im saying maybe with MX you have to have the swf in the fscommand folder.......just a friendly troubleshooting suggestion.....If youve already tried that and it didnt work than my work is done.

    Sincerely

  18. #18
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    No, that defeats the hole security feature. Check the TechNote from Macromedia.

    And the fscommand folder thingy is only in Flash MX/Player 6.

  19. #19
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    Thanks for the replies guys!

    My directory is setup like this:

    MXFLASHTEST is the first folder.

    Inside this folder is my .swf file.

    Also inside the MXFLASHTEST folder is another folder called "fscommand".

    Inside the fscommand folder is my .exe file that I'm trying to link to.

    I don't think its a file name issue, because I've tried renaming the exe "a.exe", and using that in the code to no avail.

    Also, when I'm testing it the swf file ISN'T in a html page, I just double click the swf, then click the button to try to launch the exe.

  20. #20
    Junior Member
    Join Date
    Aug 2001
    Posts
    17
    *bumptastic*

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