Reputation: 3459
The FileReference class in Flex downloads just fine, but does not do so through the browser.
The browser download window (e.g. firefox green down arrow) does not show the download has occurred. Is there a way to download from a server url which will include the download in the downloads window?
private function downloadFile(dataFile:DataFile):void
{
var downloadURL:URLRequest = new URLRequest(dataFile.url);
var file:FileReference = new FileReference();
file.download(downloadURL, "output_file.zip");
}
Upvotes: 0
Views: 587
Reputation: 316
Try using absolute path to download file, could be issue with file path. If you have debugger version of flash player then there should be a popup with error info.
Upvotes: 0
Reputation: 1153
navigateToUrl() might be a solution for you. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL()
Upvotes: 1