all groups > flash actionscript > december 2005 >
You're in the

flash actionscript

group:

Launching PDF from Projector file using fscommand


Launching PDF from Projector file using fscommand Ted Fitzpatrick
12/15/2005 7:44:59 PM
flash actionscript:
Hi,

I plan to distribute projector files (PC and Mac) on a hybrid CD burned from
the MacOSX Finder.

I'd like for a button in my Projector to launch a PDF file in whatever app. I
found a free solution called "Proxy" developed by Northcode. Northcode
developed an exe file that looks at its own name, then looks for a Windows bat
file of the same name ... it then runs the bat file, and the bat file launches
the PDF. And the exe's and bat's must be in a folder called "fscommand" within
the root of the CD, and the projector file must exist in the root, as well.

My fla is 1 frame long. I have a stop(); on an actions layer, as well as some
other fscommands to set fullscreen to false. The ActionScript is attached to a
button instance. It is:

on (release) {
fscommand("exec", "FG-BTH-98");
fscommand("exec", "FG-BTH-98.exe");
}

The first fscommand calls an AppleScript application that opens a PDF called
"FG-BTH-98" on a Mac. The second fscommand calls Northcode's exe-bat files to
open the same PDF on a PC.

But when I burn the CD, it's not working! I click on my button in the
projector, but nothing happens. I've set it all up by the book, I'm just
wondering if my fla is incorrect.

Thanks for any hints,

Ted






Re: Launching PDF from Projector file using fscommand ssfanetti
12/15/2005 7:56:23 PM
Your code looks right. When you run the executables by themselves, are they
working?

I personally use Multidmedia Flash Studio for projector applications - and I
never have issues interactring with the filesystem. You might try getting MDM
studios application
Re: Launching PDF from Projector file using fscommand epic306
12/15/2005 9:33:42 PM
This works for pc, not sure about mac.
Assuming your pdf is called "example.pdf"

1.set up a fscommand folder in the root directory.
2. put all your pdfs in this folder, next open a text editor and type
@echo off
start example.PDF
exit
3. save it as example.BAT (the bat file and pdf need to have the same name)
4. on your button in flash type
on (release) {
fscommand("exec", "example.BAT");
}

good luck
Re: Launching PDF from Projector file using fscommand Ted Fitzpatrick
12/15/2005 10:29:39 PM
Hey, thanks guys. Yeah, I'll try executing the bat file directly ... having the
exe do it was supposed to supress some sort of start-up screen ... Even if this
does work, still need to figure out how to run the AppleScript on the Mac.

I don't know what you think about this, but is it OK to attach fscommand to a
button? Maybe it only works if it's attached to a frame? Or, I'm something of a
Flash newbie ... is it OK to only have a 1-frame fla? Or, do I need more
frames? Since I put a stop(); action on frame 1 (the only frame), is this
interferring with the ActionScript on the buttons?

I've been searching Macromedia's website for clues ... looks like projector
files generated from MX + look for a subfolder called "fscommand", while those
from Flash 5- looks for the executables within the same directory as the
projector.

Still hunting ...



Re: Launching PDF from Projector file using fscommand FlashJester Support Team
12/16/2005 7:05:29 PM
Also try

JStart

http://jstart.flashjester.com

Regards
FlashJester Support Team
e. - support@flashjester.com
w. - http://www.flashjester.com

There is a very fine line between "hobby" and
"mental illness."

Re: Launching PDF from Projector file using fscommand epic306
1/24/2006 12:00:00 AM
When you launch the bat file from flash, Is there a way to hide or put that
black window (bat file command window) that pops up in the background, or at
least a message in that window that says "loading, or opening your file"?

AddThis Social Bookmark Button