-
Dowload file?
hello,
Does anyone know how I can make a page to dowload a file?
I am making a site to allow users to dowload web templates and was wondering if I can make a the usual dowload bow apear so the user can dowload a file that I will put on the server. Is this possible with AS3? If not how can I do it?
Thanx in advance!
MrSmither
-
You need to
Code:
import flash.net.navigateToURL;
import flash.net.URLRequest;
then when you want to download the file, create a URLRequest for the file you're trying to download...
Code:
var req:URLRequest = new URLRequest('http://www.somesite.com/myfile.pdf');
then open it, with a new browser window.
Code:
navigateToURL(req,'_blank');
Cheers,
J
-
wow thanx!!!
so can i make it so that that url is only accesible from that line of code aka I don't want peapol to just type in the url to the address bar and download the file...
Is that possible?