PDA

View Full Version : Calling an exe file


Zath
12-22-2005, 04:58 PM
Is it possible, with actionscript, to call an exe file?

That is, I have an swf file and a button on it. With that button, I want to simply call an exe file that will be in the same folder as the swf file. The swf file will remain open, but the exe file will run.

The swf file will not be run in an html page either.

Cota
12-22-2005, 05:18 PM
And you want to do all this from the web..? I once got around something similar, but security has changed since then. FSCommands are using for exe stuff, but mostly with the stand alone player.

Zath
12-22-2005, 05:24 PM
No, not from the web. This will be on a cd and run in flashplayer.

Cota
12-22-2005, 05:31 PM
Then, FSCommands it is...you will find explantions and parameters acceptance in the Flash help menu..

Zath
12-22-2005, 05:35 PM
Yes, I am using this bit of code inside a button...

fscommand("exec", "myFile.exe");

And published the fla to projector but it will not call the exe.

Cota
12-22-2005, 05:39 PM
Ah, see, now thats a different question...Now, are you sure it isnt blocked by an antivirus...or does the exe have any dependend DLL's that it may require to run..?

Zath
12-22-2005, 05:41 PM
No, the exe can run on any pc, I have tested it.

And, tested the button function by trying this...

fscommand("fullscreen", true);

And the button works ok. It just won't run the exe file for some reason.

Zath
12-22-2005, 05:43 PM
And, the exe file is in the same folder on the harddrive as the projector exe file.

Zath
12-22-2005, 05:52 PM
Ok, found the problem. I created a folder where the proj file was name fscommand and put the exe file in that. Also, kept the actionscrip the SAME.

Thanks,

Cota
12-22-2005, 06:27 PM
Yes, I totally forgot about that, has to have a folder called FSCommand...sorry, christmas shopping is beating my brain...