View Full Version : [AS2] Linking files to swf
umarriaz88
02-15-2009, 07:19 PM
I'm working on flash to create an autorun menu for one of my CD's
I have linked different files to this flash movie but they simply don't open when i click on them.
"this.project.onPress = function() {
fscommand("exec", "Presentation.bat");
}"
This is what script i have written....
in the presentation.bat file i wrote;
"presentation.pdf"
but the bat file does not execute when run from the flash projector file....
it does work when i separately execute the bat file....
Ne1 who can help me....
Imjake9
02-16-2009, 07:44 PM
Well, the files to run must be inside a special directory, a folder named fscommand. For example:
Let's say your CD is the D:\ drive.
Let's also say your swf is right on the CD: D:\myswf.swf
Place a directory called fscommand in the same directory of your swf: D:\fscommand
Now, place your file there: D:\fscommand\Presentation.bat
Then, in your swf, place this code:
this.project.onPress = function() {
fscommand("exec", "Presentation.bat");
}
Hope that helps! :)
northcode
02-17-2009, 02:31 AM
The EXEC FSCommand won't work from a SWF so make sure you've published your FLA to a projector, not just a SWF.
You may also want to have a look at these posts from my blog for more information about what can go wrong with the EXEC command and BAT files with Flash.
FSCommand EXEC is Broken in Flash CS3 (http://www.northcode.com/blog.php/2007/08/14/FSCommand-EXEC-is-Broken-in-Flash-CS3)
Conquering FSCommand EXEC (http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy)
FSCommand and getURL Bug in Flash Player 9 (http://www.northcode.com/blog.php/2007/09/11/FSCommand-and-getURL-Bug-in-Flash-Player-9)
Fixing the Windows Start Command in Vista (http://www.northcode.com/blog.php/2008/07/28/Fixing-the-Windows-Start-Command-in-Vista)
umarriaz88
02-23-2009, 05:02 AM
I have done all this...all these batch files are in fscommand folder and i'm making a projector file to run them...but it isn't working....
Actually it works on some computers and fails on others....I really dont know wats wrong with it :/
atomic
02-23-2009, 05:25 AM
Actually it works on some computers and fails on others...
Do you mean Macs vs PCs?
Have you specified a specific drive (like D:) in your paths, rather than using relative paths? That could be an issue...
northcode
02-23-2009, 09:10 AM
tually it works on some computers and fails on others....I really dont know wats wrong with itDoes it work on XP and fail on Vista? If so, have a look at the last link in my last post for hints as to why this might be happening.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.