如何使用 flash.filesystem.FileStream [英] How to use flash.filesystem.FileStream

查看:24
本文介绍了如何使用 flash.filesystem.FileStream的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用flash.filesystem.FileStream?

FileStream.as 文件在哪里?

推荐答案

flash.filesystem.FileStream 仅在 Adob​​e AIR 中可用.它在浏览器中的 Flash Player 中不可用.此外,没有 FileStream.as 可用于读取源代码,因为它被编译到运行时中,并且可能是用 C++ 等低级语言编写的.

The class flash.filesystem.FileStream is only available in Adobe AIR. It is not available in Flash Player in the browser. Furthermore, there is no FileStream.as available to read the source code because it is compiled into the runtime and probably written in a lower-level language like C++.

如果您想在浏览器中的 Flash Player 中打开文件,您应该使用 flash.net.FileReference 并调用 browse() 方法以显示文件对话框.一旦用户选择了一个文件,您将收到 Event.SELECT 并且您可以调用 load() 方法来获取数据的 ByteArray.

If you want to open a file in Flash Player in the browser, you should use flash.net.FileReference and call the browse() method to display a file dialog. Once the user selects a file, you'll receive Event.SELECT and you can call the load() method to get a ByteArray of data.

如果您的目标是 Adob​​e AIR,则文档 读取和写入文件 应该为您提供您需要的所有信息.

If you are targeting Adobe AIR, then the document Reading and writing files should provide you with all the information you need.

这篇关于如何使用 flash.filesystem.FileStream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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