View Full Version : Opening Applications From Flash

10-23-2002, 02:16 PM
To whom it may concern,
I am in the process of building a CD-Rom for a client that wishes to have the PDFs open in the Acrobat Reader Program. Currently, I have the CD built using Flash Projector (.exe) and the PDFs open in Internet Explorer, then inside of Acrobat Reader.

I found a couple of threads from previous users on this site and none of them have worked. I've also found some on the web in other places and have had no luck.

Any help would be greatly appreciated as I am way past due on this project because of this seemingly simple problem.


10-23-2002, 04:12 PM
What exactly did you try that didn't work? There are several ways, some free other not, to do what you need...

10-23-2002, 04:46 PM
filename = "test.pdf";
fscommand ("exec", "start\t" + filename);
fscommand ("exec", "cmd\t/c\t"+filename);

I got the above from this message/example:

Also, this sample:

button code -
on (release) {
// SYSINFO.QUERYOPEN requires 2 parameters:
// 1) the extension to check for, and
// 2) the variable which will be set to "TRUE"
// if the extension is found in the registry
pdfFound = "?";
fscommand("ARG", "pdf");
fscommand("ARG", "pdfFound");
// Set the variables which tell the controller
// which variable to check for, which frame the install
// option is found in, etc, and start it looking
simpleCtrl.whichVar = "_root.pdfFound";
simpleCtrl.runFile = "series/series.pdf";
simpleCtrl.closeWin = false;
simpleCtrl.checking = 1;

Additional code -
onClipEvent(load) {
function registryCheck() {
// debug: _root.x = "in registryCheck";
// if no association found in registry, give user option to install
if (eval(whichVar) == "NONE") {
// otherwise, check version of application found
} else {
_root.x = eval(whichVar);
_root.ssFileVer = "?";
fscommand("FILESYS.FILEVER", eval(whichVar));
// pass versionChecker the string that defines the application
// and the variable where the version number will be saved
_parent.versionChecker.appString = eval(whichVar);
_parent.versionChecker.appVersion = "_root.ssFileVer";
_parent.versionChecker.checking = 1;

onClipEvent(enterFrame) {
if (checking) {
if (eval(whichVar) != "?") {
checking = 0;

10-23-2002, 05:45 PM
Originally posted by james@thekarche
I got the above from this message/example:
LOL :D That was my translation... Why did you read the Serbian translation? It doesn't seem likely that somebody called "james@thekarche" is serbian... :D :D :D

Now seriously, if you are using MX it won't work, since all the .exes you want to launch must be in the folder called fscommand on the root of your projector. There is a free application called Executor that can open any kind of file in its default application but it has two drawbacks: user must have Flash Player 6 installed, and since it is free application it displays a small popup for 1second as a credit for the programer.

There is another free program called FlashGeek, you can pick it up here:


It will work with MX since it passes arguments through text file but if you have a lot .pdf files to launch, it is not the best solution since you have to make one .exe and one .txt file for every .pdf file you want to launch from projector.

Lastly if you use Flash 5 projector you can use Master's Flash Command Line Tools, which doesn't have any drawbacks, as far as I know.

Check the links for Executor and Flash Command Line Tools in my Tutorial about Flash Projectors and CD Burning:


Hope this helps...


10-23-2002, 05:52 PM
THANKS FOR YOUR HELP... I will check into those items you suggested. I have both versions of Flash, but use 6 most often.

I had to quickly find the example through Google where I found it before and that was the first instance I found it. Oops. Good think it wasn't only available in Serbian, I might have been in real trouble.

Thanks again,

10-24-2002, 08:12 PM
Hey man, I got it.


10-24-2002, 11:06 PM
Originally posted by james@thekarche
Hey man, I got it.
obrigado! You are very welcome :)

PS: Hey guys... I do not even know how to say this :( ... I know that most of the time it is near to impossible to know who is behind those nice niks, but let just not presume that all Flash users around are men (although you are probably majority). It is true that word 'man' in this context is used in that "buddy" meaning and doesn't realy mean exclusively "male", but when I read it, it still sounds a bit strange to me being a woman. I am not rampaging feminist, I just wanted to point this little "uncomfort" out to you since it would be waste of time for me to respond with "sorry, but I am a WOMAN" every time somebody writes: "Thanks, MAN" :D



10-25-2002, 12:08 PM
My apologies, ma'am. The strange thing was I actually knew you weren't a guy. An oversight on my part.


10-25-2002, 09:15 PM
No offence taken James :) ...

And it wasn't meant just for you, but for all the boys around ;) ...



11-05-2002, 03:23 AM
Hi, everyone...

Sorry to bother you with that, but...

I was trying to use the button code given
by Mr. JAMES and It didn't work...

All I need is to do the right thing the function
written by Mr James does. Detect if the
ACROBAT READER is installed in the client machine.

I'm for sure using the standalone player.
I need some help to make it work.

Could you, please?

Thanx in advance.


11-05-2002, 05:34 AM
Originally posted by DiDi
...........I just wanted to point this little "uncomfort" out to you since it would be waste of time for me to respond with "sorry, but I am a WOMAN" every time somebody writes: "Thanks, MAN" :D
DD heheheeeeeeeeeeeeeee :D :D lol
Just put the "I AM A WOMAN:mad:" under your avator :p ;)

11-06-2002, 01:19 AM

I'm a bit confused over here...

The code above, written by James just works with the

How do these things work?


I'm a jerk!


11-06-2002, 11:28 PM
Originally posted by zerooito
All I need is to do the right thing the function
written by Mr James does. Detect if the
ACROBAT READER is installed in the client machine.I am unable to help you in this issue :( ... As far as I know you need a separate appl to check if Acrobat (.pdf) is registered extension on users machine - I don't think you can do it directly from Actionscript. I don't know if SWF Studio can do it or what exactly the above code does.

What I suggested to James were a few free programs that allow you to open files from projectors. Of course if the Acrobat Reader is not installed on the machine they won't work if you try to open a .pdf file...



PS: flux2k made lately a great FREE program for Flash MX projectors that checks if Flash OCX is installed on users machine:


He mentioned that building this appl was relatively easy, so you can try suggesting him to do the equivalent for Acrobat...

11-07-2002, 02:49 AM

I had a strange sensation that was the truth...

so I really need to use an external application to

make an Flasheinstein...

Damn it...

I wont create a monster myself.. hehehe...

thanx a lot, DIDI and all other buddies,
but I'll detect the acrobat via javascript.

Thanx anyway.


11-07-2002, 09:10 PM
I think Northcode over at Flashkit has a program for detecting if acrobat is installed. Check out the Flashkit boards under Standalone Applications.

I'll see if I can figure out how to do it too. ...but don't hold your breath :D I think it's just a matter of searching for a registry entry.

So is distributing the acrobat installer on CD projects ok with Adobe?

11-07-2002, 10:31 PM
Northcode wrote the instructions for viewing .pdf files even if Acrobat Reader is NOT installed:


It is for his product SWF Studio but I remember reading in one of his posts that it can be modified to work from normal projector.

Even though you can distribute Acrobat Reader installer on CD, (after a free register procedure at Adobe home site), it is not clear if viewing a .pdf file from Reader installer files on CD (without installing it on user's machine - which is exactly what Acroread instructions explain how to) is legal, and Northcode warns about this incertitude.


11-08-2002, 01:18 AM
Thanx, folks!...

I'll take a look at flashkit.

I just forgot that this site exists... hehehe...

C ya!


11-08-2002, 07:49 AM
Hi mate,
I am doing exactly the same thing as you. I am doing a CD ROM that is basically a huge Flash Projector (exe) and I needed to link to web sites, PDF's, QTVR's and Movs. I contacted Macromedia and they told me to check out www.flashjester.com and download JTools.
You do have to pay but it is only about £35 ($57 I think) but it is mint! Really usefull to help you access the clients HD, external Web Links, FTP, PDF's and pretty much anything. Amazing software!


Sir Patroclo
11-09-2002, 05:19 PM
Hi people!

I'm too building a CD-ROM with a projector and stuff... it's all done, and I followed all the instructions in the wonderful tutorial on burning hybrid cds written by DiDi (oh dama del scripting, ninfa grácil de los bosques binarios y otras cosas que la distingan como fémina)... anyways, everything works fine both in Mac and PC, with autorun/autostart and stuff. But when you try to open a .hqx file from the projector in Mac, it won't work. The code on the buttons is as follows:

on (release){
fscommand ("exec","myfile.exe")
fscommand ("exec","myfile.hqx")

the external .exe and .hqx are in the fscommand folder (I'm working on MX).

I need to know if someone has ever succeeded to make a working thing for both platforms, and how!! I'm really thinking of switching from CD-ROM hi tech thingies to sock puppets to show multimedia stuff

11-10-2002, 12:11 AM
Wow... I am flattered with such poetic praise :o, but I assure you it's undeserved...

You seem to have missed the very beginning of my tute - HQX file is not Mac executable, it is form of encoding, meaning you can not launch it with fscommand as you do with .exe on PC. It should be decoded first.

How did you make that cross platform CD? Are you working with Mac or with PC? Give us some details...


Sir Patroclo
11-10-2002, 01:14 AM

DiDi: yes, I noticed that shortly after posting here, it was at the beginning of your tutorial, and I was only reading the middle part of it, about burning on PC... (there's no face of dumb embarrassment in the smilies, but that's the idea).

I burned the cd with MacImage from a PC. As I said, it works fine in all autostart matters, but there's some point in the movie when you can launch external stand-alone players, because I needed "pop-up" windows...

Is there a way to set the buttons to launch the projectors when in Mac, burning from PC? Is that Applescript thing the only way to go (oh god please no)?

The .hqx files appear with the zip icon in my OS (working with WXP pro), and I can open it and reach a file with no extension, and I can't do anything with it, not even change it's name, just extract it from the .hqx

Thanx for your help

Sir Patroclo

11-10-2002, 04:15 AM
OK, let me see if I understand this well:

You have (main) PC projector and Mac projector and you want to launch other projectors from them? Since your Mac projector is working with autostart and everything, that means that MacImage succesfully decoded the .hqx file of your main Mac projector. I see no reason why it wouldn't do the same with the other .hqx files...

I have two suggestions:

1. You should try putting the name of the second Mac projector without extension (since it doesn't make any sense for Mac):

on (release){
fscommand ("exec","myfile.exe")
fscommand ("exec","myfile")


2. If this doesn't work, try making two fscommand folders, one you should put into ISO partition (it will contain other PC projector - .exe) that will be the root for the main PC projector; and other fscommand folder should go tho the HFS partition (with second Mac projector - MacImage should decode it as it did the main one) which will be on the root of main Mac projector.

I can only think about this two options at the moment (it's almost 7am here in BCN and I am very sleepy... :) ), but it's interessting "rompecabezas" and I promise to try something more tomorow...

Hope this helps...


Sir Patroclo
11-10-2002, 05:42 PM
Hi DiDi:
Yes, I thougt of deleting the extension in the code, but my biggest problem is that I don't have access to a Mac to test things, I have to ask a friend who doesn't have much time, so the feedback is extremely slow. I'm still waiting for the results from that "no extension" test...

But I think that the combo between separate fscommand folders and no extension script should work, now that you tell me that MacImage decodes the .hqx...

Anyways, if some kind Mac owner has the time to do the testing, it'll be great, so DiDi can add this info to her tutorial and help a lot of people (it's amazing the amount of threads in different forums that asks for help in this subject)

If my friend writes me back with the results, you'll be the first to know

Thanks again

Sir Patroclo

11-10-2002, 07:20 PM
Originally posted by Sir Patroclo
my biggest problem is that I don't have access to a Mac to test things, I have to ask a friend who doesn't have much time, so the feedback is extremely slowYeah, I know the feeling... Oh boy... When are we going to become the real professionals and have at least the basic means to do our work properly... :(

I would try myself this double fscommand folder thing, but I don't even have a spare CD at the moment and it's sunday.. :mad:

Looking forward to your reply...


11-11-2002, 01:24 AM
Here what I've used to run mac and pc projectors:

if (getVersion().substr(0, 3) == "WIN") {
fscommand("exec", "yourprojector.exe");
} else {
fscommand("exec", "yourprojector");

...I guess I'll have to rewrite that for the linux player soon :D but you get the idea.

Sir Patroclo
11-11-2002, 03:10 AM
Hi Flux!
Two questions:

1. Is it mandatory for it to work to recognize the platform (Win or Mac)?

2. How do you burn the cd?

And please tell us anything else that could be of interest, of course...


Sir Patroclo

11-11-2002, 03:34 AM
I am afraid he works mostly with Mac so he probably does burning with Toast and that's of no big help for our issue...

But hey, any suggestion is helpfull...


11-13-2002, 01:25 AM
Yes, fortunately I have both a PC and a Mac at work so I do not have the .hqx "problem" when I publish to a mac projector. (fonts on the other had are a whole other can of worms).

I wrote the code above because I was wondering why I couldn't exec using a single fscommand. I was leaving out the extension (fscommand("exec", "program");) 'cause I figured that Flash MX would assume to run "program.exe" under Windows and "program" under OS X. Turns out I was wrong so currently I am using the code above in my current project and so far it is working.

and yep, I'm using Toast to burn a mac/pc hybrid cd on my Mac.

For those that do not have access to macs, I suggest going to Kinko's (US and Canada only, afaik) and burning your master cd there.