问题
Will
How to use flash.filesystem.FileStream ?
FileStream.as file Where?
回答1:
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++.
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.
If you are targeting Adobe AIR, then the document Reading and writing files should provide you with all the information you need.
回答2:
This is an AIR only class, so you have to be compiling to the AIR runtime to get it to work.
来源:https://stackoverflow.com/questions/4068237/how-to-use-flash-filesystem-filestream