使用 flash/flex 下载/保存/写入客户端硬盘上的文件 [英] Download/Save/Write a file on the client's hard disk using flash/flex

查看:25
本文介绍了使用 flash/flex 下载/保存/写入客户端硬盘上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用 flash 或 flex 将文件从我的服务器下载/保存/写入到客户端的计算机.

I wonder how can I download/save/write a file from my server to a client's computer using flash or flex.

我正在寻找的一个例子是可用http://www.flexdownloads.com

An example of what I'm looking for is avilable on http://www.flexdownloads.com

  1. 注册
  2. 登录
  3. 点击页面右侧的(免费")按钮.(这橙色按钮)
  4. 选择任何产品(不会花费您任何费用)
  5. 按立即购买"

然后你会看到一个确认弹出窗口对于下载,然后您选择你想在哪里保存文件,和 Flash 电影保存文件!

then you'll see a confirmation popup for the download, then you choose where do you want to save the file, and the flash movie saves the file!

推荐答案

使用 FileReference

http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7.html

var request:URLRequest = new URLRequest("index.xml");
var fileRef:FileReference = new FileReference();
fileRef.download(request);

这篇关于使用 flash/flex 下载/保存/写入客户端硬盘上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆