Grab a ProgressEvent from a POST upload in as3

2019-04-08 15:17发布

Is there any way to track the status of a posted upload in AS3? There is a ProgressEvent, but it gives data back about the response, not the actual POST upload. I'm posting binary data for an image, so it's usually in the 50-100kb range.

The image data was generated inside Flash itself, so I can't use the upload method - at least as far as I know.

Thanks!

3条回答
Animai°情兽
2楼-- · 2019-04-08 15:46

Perhaps you can use a function at the server side to send progress events to the flash object?

查看更多
该账号已被封号
3楼-- · 2019-04-08 15:54

Take a look at the FileReference class. The progress event in it will give you data about the upload:

Dispatched periodically during the file upload or download operation. The progress event is dispatched while Flash Player transmits bytes to a server, and it is periodically dispatched during the transmission, even if the transmission is ultimately not successful. To determine if and when the file transmission is actually successful and complete, listen for the complete event.

查看更多
Root(大扎)
4楼-- · 2019-04-08 15:55

He's not asking about the filereference list..

He has the same problem that I have, there's not a method to have a post data transfer progress. I think that the only way is that one suggested above, sending from PHP to flash a progressEvent checking the size of the data received (If it is possible..);

Bye

查看更多
登录 后发表回答