Open devlfm opened 6 years ago
That's normal, the class FileStream
etc. in package flash.filesystem.*
are not available yet (as they depends on Event
).
When this class will be available the method
public function readMultiByte( length:uint, charSet:String ):String
will only support "utf-8" for the charSet
parameter.
In the mean time you can use the C functions in the package C.stdio.*
to
manipulate file streams: eg. fopen()
, fdopen()
, fwrite()
, fread()
, fclose()
, etc.
or you can also use the FileSystem
class in package shell.*
to read and write files:
FileSystem.read( filename:String ):String
FileSystem.readByteArray( filename:String ):ByteArray
FileSystem.write( filename:String, data:String, useBOM:Boolean = false ):void
FileSystem.writeByteArray( filename:String, bytes:ByteArray ):Boolean
as a side note, the Flash API are coming in the next few releases with events and everything there are not just there yet
Hmm I'll give it a try! thank you @zwetan
I was able to use FileSystem, but as soon I needed to import from flash the packages: import flash.utils.ByteArray; import flash.utils.CompressionAlgorithm; got the same error ^^
I'll wait for the flash packages then..
Thank you again
you gonna have to provide more details, do you compile an .abc
first ?
which redshell are you using? did you try with redshell_dd
?
Hi, I did not compiled .abc first, it is required?
I followed the tutorial of windows with flashbuilder
no it's not required, but describe how you use it? I mean there is many ways so tell me about your setup
Hi,
I'm trying to use this to run server side, I need to load files, parse them and save/return a json.
I was trying to use FileStream like the example says here: http://docs.redtamarin.com/0.4.1T111/flash/filesystem/FileStream.html
but, as soon I import flash.filesystem.* and use File or FileStream, I get error "VerifyError: Error #1014".
Also, the method fileStream.readMultiByte(file.size, File.systemCharset); is not available :(
All I can do is "trace" ^^
I'm on windows x64, using flashbuilder. I was thinking on using my parser.abc on a linux server.
Any help is very welcome