AS 3 projector open pdf using fscommand

I'm tasked to create a CD with a projector file that launches. The main function of this exe is to open various PDFs on the CD in Acrobat.

I've tried the following:
fscommand("exec","CH1.pdf");
fscommand("exec","cmd.exe /C start CH1.pdf");

I have pdf files in the root directory with the projector file as well as a sub directory called 'fscommand'.

I am getting no errors or response when the buttons are clicked.
LVL 2
saic_gcoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CyanBlueCommented:
You cannot execute the PDF file like you have the first line...  The second line does not work because fscommand exec won't work with any command that has space hence you cannot pass any argument to the cmd.exe...

The solution would be creating a batch file with that cmd.exe line and execute the batch file with fscommand exec command...  That batch file should be placed into the fscommand directory...

CyanBlue
0
saic_gcoAuthor Commented:
wouldnt the call for a batch file require a space aswell? or would i need a bat file for each pdf?
0
CyanBlueCommented:
You need a batch file per PDF file...

CyanBlue
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

saic_gcoAuthor Commented:
Ok function now calls:

fscommand("exec", "start.bat");

Place start.bat in my fscommand directory:
exec CH1.pdf

I double clicked the bat file and it works fine, however still not working in the test movie or published projector movie.
0
saic_gcoAuthor Commented:
// add on click listeners to buttons
ch1.addEventListener(MouseEvent.CLICK, callPDF);

// function to call pdf
function callPDF(e:Event) {
      try {
            fscommand("exec", "start.bat");
      } catch (e:Error) {
            trace("Error occurred!");
      }
}
0
CyanBlueCommented:
I think the batch file should be saying this...
   start CH1.pdf

You might also want to take a look at this page...
   http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy

CyanBlue
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saic_gcoAuthor Commented:
I thumbed exec in there, it indeed is: start CH1.pdf

reading your link I found the culprit:

"Update One additional restriction you will have to deal with is the fact that Flash 9 projectors can't launch BAT files on Windows 2000, XP and Vista."

As I am on XP; and potentially many of the users will be using XP or Vista. Therefore its back to using navigateToURL or finding an alternative to bat files. It is not opening the pdfs directly, eg:

fscommand("exec", "CH1.pdf");
0
CyanBlueCommented:
I do not have an access to the Windows machine at the moment...  I'll check to see if I can create a sample for you...

CyanBlue
0
CyanBlueCommented:
Oh, what is the version of Flash IDE and the version of ActionScript you are using???

CyanBlue
0
saic_gcoAuthor Commented:
CS3 and AS 3.0, I'm currently trying to get it working using AS 2.0 but no luck. When I double click the proxy.exe file I get the "Security Warning" which is what I assume is breaking it. However after copying the file the warning no longer shows, but it is still not working.

What a headache! Thanks for your time on this.
0
saic_gcoAuthor Commented:
There are too many variables un-accounted for that could complicate and fault this solution (non-solution). We are going to dump flash and just do a basic HTML page as a gateway to the content.

Thanks for you help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.