I can't figure out, how I can solve this problems. I always get an type error, when trying to send the ByteArray via JSON. Maybe I should read in chunks, instead of a whole file? But I don't think, that this would help from freezing the program...
The freeze while performing a long operation is fairly common problem. The solution is to break up the operation so that you only do so many iterations at one time. This gives the UI time to update. See http://senocular.com/flash/tutorials/asyncoperations/
Do you need to encode the data being sent via JSON? Flex has a base64 encoder class that takes a byte array.
Thanks for your help I'll try your link.
But I don't need to send it base64 encoded - I have to send the bytes as an array. For example:
For now I create the array in a for-loop, because when I try to convert the ByteArray to JSON and send it to the Webservice, I get an error, that this type is not allowed... It would be great, if I could "wrap" the array with the bytes from the ByteArray.
Seems there is no solution...?