Grab a ProgressEvent from a POST upload in as3

耗尽温柔 提交于 2019-12-06 03:16:25

问题


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!


回答1:


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




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/99319/grab-a-progressevent-from-a-post-upload-in-as3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!