It's still not working... I'm sure I did everything you said, but I must have missed something... my fscommand folder is set up correctly and my actionscripts work...I'm guessing I messed something up with the first frame script... is this correct?
function SmartExec(target)
{
platform = $version.slice(0,3);
Looks okay except for the typo "fscommnd" in the call to the WIN version. I have your files here, I'll copy them over to the old G4 and see if I can figure out what's going wrong.
So I know the function is running thanks to the trace() but it still won't run the test_script.
According to this script, 'test_script' should just be an executable Applescript application located in the same directory as the .swf calling it right?
The Applescript works by itself, so somethingmust be wrong with how I'm calling it in Flash...
wait though, i did as prescribed but it still won't work..
i've got the function running successfully in the projector, and the 'test_script' residing in a folder at the same level as the projector called 'fscommand', but still the Applescript doesn't execute when the function is run...
Any other ideas?
Last edited by scottPadgett; 03-14-2005 at 03:23 PM.
with this one which will work with more versions of Flash
platform = substring($version,0,3);
AND/OR make sure that the SmartExec function is at the root of your movie or $version won't exist. So you can also try using _root.$version in place of $version (if the substring trick doesn't work).
Hey Northcode, it's your old friend MacArtist... you had created .bat and .exe files for me to open PDFs off CD-Roms... I need to change the names of the PDFs, what program can I edit the .bat and .exe files in?
Hi Nothcode, I've attached a copy of one of the files you made for me... I was thinking I should simply name my PDFs "01.pdf", "02.pdf", "03.pdf" etc...
Then I could use these as my templates... what's your thoughts?
You don't need to edit the EXE files, just make copies of CMS_1500.exe and rename the copies to 01.exe, 02.exe, etc. You'll need to make copies of the BAT files, rename them the same way and edit the name of the PDF file inside the BAT file to match. The BAT files are really just text files so you can edit them with notepad or any editor that just saves as plain text.
I tried to follow this tut of yours, but in the end I can´t manage it to work...
I followed all the steps you said but when I clik the button it doesn´t do any thing...
I´m wondering if I can send you my files?! I´m really stuck on this....
Hope you can help...
Originally Posted by Northcode
Hi MacArtist6, I can help and it won't cost you a cent If you know your users already have Acrobat on their machine then you're golden, the solution is easy and I have some FREE tools that you can use to help.
The START command on Win9x/ME is implemented as an EXE file. On NT/2K/XP it's an intrinsic command so the way you call it on each system is different. To get around this you can get a copy of my INVOKE utility from www.extendingflash.com and use it like this from a BAT file.
Code:
invoke.exe open \files\pdf1.pdf
Now you can't call this from Flash directly because Flah MX and MX04 don't allow you to use chr(9) or spaces in command line like Flash 5 did (like in the examples on the extendingflash web site). Instead you put that command in a BAT file and use my PROXY utility.
Proxy is a FREE tool I wrote that will let you run BAT files from Flash and avoid the ugly DOS box. You can download the utility from www.northcode.com/misc/proxy.zip. There's documentation in the ZIP file, and (as Whispers pointed out) there was a big discussion about it (and some other utilities I wrote) in this thread... http://www.flashkit.com/board/showth...hreadid=519274
So you take a copy of PROXY.EXE and rename it to PDF1.EXE and put the commands from the code block above in a file called PDF1.BAT and put both of these files (and INVOKE.EXE) in a folder called "FSCommand" in the root of your CD along with your projector. The example BAT file assumes there is a folder in the root of the CD called "files" where all your PDF files are.
You can change the location of the PDF files (just remember to update the BAT file). You can change where the FSCommand folder and your projector are on the CD, the only restriction is that they both have to be in the same folder.
Now to open your PDF file from Flash you can just put this in the on(release) event for your button...
Code:
on (release) {
fscommand("exec", "pdf1.exe");
}
Create PDF2.EXE and PDF2.BAT, then PDF3.EXE and PDF3.BAT and repeat for each button and PDF file you want to open and you're done.
If you want to integrate this with the MAC side of things you should read this thread http://www.flashkit.com/board/showth...hreadid=539618 and check out the SmartExec function I wrote to help pjutter do pretty much the same thing you're trying to do now.
I'll be checking in here over the holidays if you need more help with this...