a PROGRESS event when uploading ByteArray to server with AS3 & PHP


Question

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

1
1
1/21/2010 6:20:06 AM

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

1
5/23/2017 12:30:46 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon