View Full Version : Opening a file with a button
Daveo123
June 6th, 2003, 06:55 PM
I haven't for the life of me been able to figure out how to open a file (Non .exe or .swf) with a button from a movie.
Here's the scenario, I need to open a PDF file by clicking on a button. GetURL won't do it even if the browser is set to open PDF's with a plug-in. As far as I can tell FSCommand will only open executables.
HELP!
Thanks,
Dave...
Keith130
June 8th, 2003, 09:14 AM
I did something like this before, you need to use fscommand to open a .bat file which will open the .PDF file, ill go and look at my file and post back.
Keith130
June 8th, 2003, 09:21 AM
You need a button with on(release){
fscommand("Exec","filename.bat");
}
Then open notepad and type in the following START filename.pdf Then go to save as and type in a file name then .bat
N.B make sure the file that the flash button is opening it is the same name as your .bat file. They both have to be in the same directory.
Daveo123
June 8th, 2003, 01:21 PM
Thank you so much for your response, it works like a charm!
Keith130
June 8th, 2003, 04:22 PM
Thats ok Daveo123 im happy to help
.:®:.
June 10th, 2003, 01:11 AM
just refreshing this issue,
In my learnings, i have come across this issue, is it possible to do a check for Macintosh or PC, ie, if ur on a mac, open this file, if ur on a pc, open this other file. i know javascript can redirect?.
Any thoughts?
kode
June 10th, 2003, 01:28 AM
getPlatform = function () {
var ver = System.capabilities.version;
return ver.substr(0, ver.indexOf(" "));
};
trace(getPlatform()); // returns WIN/MAC/whatever
.:®:.
June 10th, 2003, 02:06 AM
Kx, u r a legend!
Thanks! =)
kode
June 10th, 2003, 02:11 AM
:P
you're welcome. ;)
pom
June 10th, 2003, 10:24 AM
That's useful :) Can someone please rate this?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.