This content has been marked as final. Show 6 replies
1. if you're using flash 8, check the filereference class.
As kglad said, if you use Flash 8(or more specifcally, publish for Flash Player 8 only), then you can use the FileReference class. It's not exactly what I'd call "basic" but it is fairly straigh forward. The bare bones are:
var fileRef = new FileReference();
However, there is alot of other code that could be added to handle all the different situations that occur, such as if the dialog fails to open, or a user clicks cancel, ect.
And, if you are *not* using Flash 8, then doing this is anything but straight forward. In fact, it's impossible to directly call a download/upload action from Flash in previous versions.
> In fact, it's impossible to directly call a download/upload action
> from Flash in previous versions.
Sure, but depending on what kind of file you are trying to download you can
still get the rsults you need - if it's a ZIP file, a simple
will do it.
Remove '_spamkiller_' to mail
> Sure, but depending on what kind of file you are trying to download you can
> still get the rsults you need - if it's a ZIP file, a simple
> getURL( http://www.mydomain.com/myZipFile.zip);
> will do it.
You're right, for some reason I was thinking that even in that case it requires a new window to be opened, but now that you mention it, it doesn't, does it? It only opens a browser if the SWF is not already in a browser(in the case of a projector, for instnace).
no, i think it opens in a browser window if it's a file type that a browser can parse. otherwise, it's presented for download.
I think that any call to getURL() will open a browser if you aren't running the SWF in a browser -- in the case of projector .exe or stand alone .swf. But if playing in a browser, behavior is as you describe: getURL use browser window only if it can parse, otherwise prompts download. I imagine it is because getURL can only act in the context of a browser. So if a browser is not active with the SWF already it has to be activated.
All that said, I wonder what kenshamrock is actually trying to download, anyway :-)