I'm currently creating a series of as3 / PHP classes that upload - encode + download images.
Anyone know if there's a way to report progress while posting a ByteArray to the server?
the ProgressEvent is not working -
at least not in the case of uploading a ByteArray -
it reports progress only after it's been uploaded
here's a stripped version of the code I'm using ...
urlLoader=new URLLoader;
urlLoader.dataFormat=URLLoaderDataFormat.BINARY;
urlLoader.addEventListener(ProgressEvent.PROGRESS,progressHandler);
//
function progressHandler(e:ProgressEvent):void {
trace(e.bytesLoaded/e.bytesTotal);
}
thanks -MW
Are you using an URLLoader to send it? You should beable to add a ProgressEvent listener to it.
EDIT: You might need to send data back from PHP, see here: Grab a ProgressEvent from a POST upload in as3
http://www.ibm.com/developerworks/library/os-php-v525/index.html