View Full Version : Allowing Downloads
Taylor Tay
09-27-2006, 05:39 PM
This may sound silly, but I have a pdf that I want to allow people to download from my flash site, and I don't know how to do that. Any help would be greatly appreciated.
Thanks
Taylor Tay
oldnewbie
09-27-2006, 05:49 PM
Zip it up...
Taylor Tay
09-27-2006, 05:50 PM
Ok I'll try it thanks!
redsodeep
12-22-2006, 05:03 PM
I'm new to flash and am trying to do the same thing. What do you mean by zip it up? Make a zip file of the pdf then import it into the library? When you do that, what kind of code do you need on the file to allow the download? Thanks!
anonymous
12-22-2006, 05:16 PM
Zip up the .pdf, and upload the zip to your server, and point to it on a getURL in your movie...
myPDF_but.onRelease = function(){
getURL("http://www.yourDomain.com/yourPDF.zip");
};
redsodeep
12-22-2006, 06:18 PM
Thanks a lot for your reply. If I'm doing an interactive design that isn't going to be on the web, rather on a CD, would I just keep a folder with the PDF's in it and just change the code to point to the folder?
lightnb
01-02-2007, 10:57 AM
Thanks a lot for your reply. If I'm doing an interactive design that isn't going to be on the web, rather on a CD, would I just keep a folder with the PDF's in it and just change the code to point to the folder?
If the PDF file is on the CD, then there isn't a need to download it...
Do you want a link in the movie that opens the PDF from the CD?
Or do you want the presentation on the CD to go to a webserver to download the file?
If the first is true, try this:
pdf_btn.onRelease = function()
{
fscommand ("exec", "myfile.bat");
}
For this to work, you need a folder called "fscommand" that is in the same place as the .exe flash projector.
in the fscommand folder, create a .bat file called "myfile.bat", that contains the following:
start ../include/mypdf.pdf
Now create a second folder next to the "fscommand" folder called "include" and inside the include folder, place your pdf file.
Note that the name of the PDF file must be the same as the name in the bat file.
Hope this helps,
Nick
redsodeep
01-05-2007, 04:32 PM
Hi Nick,
Thanks a lot for your help! The file will be on CD. I'd like the document to be able to function without having to use the internet.
I made the .bat file and I've done everything, the only problem is that I'm getting errors with the code. Am I missing something? This is what I used:
pdf_btn.onRelease = function()
{
fscommand ("exec", "myfile.bat");
}
The error reads:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
pdf_btn.onRelease = function()
Total ActionScript Errors: 1 Reported Errors: 1
Thanks again!
-Heather
lightnb
01-06-2007, 06:59 AM
The code seems fine... Is there any other action script in that frame?
anonymous
01-06-2007, 02:49 PM
pdf_btn.onRelease = function(){
fscommand ("exec", "myfile.bat");
}
The above code must be a frame action, and must not be set on the symbol itself. The window in which you set it must read Actions Frame & not Actions Button or Actions Movie Clip...
Right-click the frame and select Actions...
Remove the other script set in the wrong window.
redsodeep
01-11-2007, 03:22 PM
Ok, it's working now. Thanks a lot for all your help!
-Heather
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.