I'm totally new to ActionScript 3, though I'm a OOP coder.
I've seen with this snippet that I can easily change bytes one by one.
var j:int = myFile._fileRef.data.length;
while (j--)
{
myfile._fileRef.data[j] += 128;
}
When I upload a file after applying a change to every byte, the results seems perfect. But when I'm trying to directly assign a new bytearray (an encoded one) to the data member of _fileRef, the compiler reminds me that it is read only.
Is there an appropriate method to quickly modify the bytearray of the file before uploading it?
[EDIT]
Could it be in the method I use to assign a byte array? I'm directly assigning an encoded array to the file:
myfile._fileRef.data = DESencodedArray;