|
-
Lifetime Friend of Site Staff
SmartExec always uses the same target parameter and then, based on the platform you're running on, SmartExec tacks on ".exe" or "_script" and tries to launch that file. So the only thing in your button release event should be a call to SmartExec and the base name of the PDF file you want to open (i.e. the name of the PDF file without the extension).
Code:
function SmartExec(target)
{
platform = $version.slice(0,3);
if (platform == "WIN")
{
fscommnd("exec", target + ".exe");
}
else
{
fscommand("exec", target + "_script");
}
}
The agreement required to make this work is that in the fscommand directory with the PDF files, there has to be an EXE (and a BAT) file for every PDF and an AppleScript file for every PDF. The names of these files are the same as the names of the base PDF files with .EXE (and .BAT) and _script tacked onto them. This is all done for the benefit of SmartExec.
Because of SmartExec, the code for the MAC and the ActionScript code for Windows is EXACTLY the same. So you can have one PDF file and generate both the MAC and Windows projectors from the same FLA (unless you have some other reason to keep two FLAs).
So for the call to SmartExec("CMS_1500") to work in both cases you need to have the following files in your fscommand directory.
CMS_1500.PDF
CMS_1500.BAT
CMS_1500.EXE (copy of proxy.exe, renamed)
CMS_1500_script (the AppleScript script file)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|