PDA

View Full Version : Problem with "exec"


JMS88
05-04-2005, 04:30 PM
Hello,

Hopefully someone will be able to help with this.

I have this line of code atytached to a button and it won't work:

on (release) {
fscommand ("exec", "c:/Webconnect.exe");
fscommand ("quit");

}

It won't launch the exe. I ran thorough this tutorial http://www.actionscripts.org/tutorials/beginner/exec_files/index.shtml and tried using "start" and "cmd" and it didn't work either. When I click the button it just closes the the flash exe.

I'm using MX2004 and Windows 2k professional. Any ideas?

Thanks!
John

oldnewbie
05-04-2005, 07:04 PM
Since MX, the .exe must be located in a direct "fscommand" subfolder of the folder that holds your projector file...

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14280#Exec

Furthermore, if the .exe is located elsewhere on your drive, you must then use fscommand calling a batch file, also located in the fscommand subfolder, which will in turn call the .exe with your different path... And then there's the problem of the flash of a DOS window...

Might be better to just use 3rd party software (FlashJester, Northcode...), to open up your .exe's.

JMS88
05-04-2005, 11:03 PM
Thanks a lot for your help. This was exactly the information I was looking for.

JMS88
05-06-2005, 07:20 PM
One more thing...

I took your advice and started playing around with FlashJester. The only problem I have is that JStart only works when you publish a Flash .exe, not an .swf. I wanted to launch an application using a flash button on an Intranet site at my work so obviously I would be using a .swf.

I guess my question is, can you launch files with FSCommand contained in an .swf or does it only work in the Flash.exe? Am I missing something :confused: