This content has been marked as final. Show 5 replies
With the FileReference class you can do so, but for one thing you need flash 8 to use it, and for the other I'm not sure if it will work in your case without a lot of reworking your app.
Thanks very much for your reply, but it seems that FileReference will only work if the file exists on the user's filesystem, which it doesn't. to get the data to be uploaded i'm calling the draw method of a BitmapData object and passing it my flash.media.Video object, so the file only exists in client main memory and never on the client filesystem. I think my only option is to make RMIs from the server as the data is uploaded, causing a progress bar on the client to move along. sigh.
i'm using flash 9, by the way. or, rather, i'm using a flex builder plugin for eclipse and coding in actionscript 3.
after posting my answer I allready had doubts about it, rethinking the camera stuff. I haven't had a lot of opportunity to look into AS3 untill now, and I'm a bit frustrated if they haven't thought about a way to adress your problem, but it might just be that Adobe is thinking Flash Media Server only in conjunction with camera.
Just out of curiosity, as the topic turns upe once in a while here, do you (attempt to) upload the bitmat data uncompressed, or are you having an elaborate way of compressing the data?
i do compress the data, though i would hardly call the method elaborate. i instantiate a ByteArray and then pass to its writeBytes method the return value of getPixels called on my BitmapData. then i call the compress method of the ByteArray. on the server side, i decompress in java and convert to jpeg before storing in my database.
> Just out of curiosity, as the topic turns upe once in a while here, do you (attempt
> to) upload the bitmat data uncompressed, or are you having an elaborate way of
> compressing the data?
Unlike Flash 8 AS2, AS3 provides built in zlib compression: