Grateful for your reading first.
This is my code:
private function send( pkt:ByteArray )
{
var int count = 0;
var request:URLRequest = new URLRequest( ... );
var loader:URLLoader = new URLLoader( ... );
request.contentType = URLLoaderDataFormat.BINARY;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, loader_complete);
loader.dataFormat = URLLoaderDataFormat.BINARY;
request.data = pkt;
loader.load( request );
//to pause the execution
while( count < 100000000 );
}
The COMPLETE event will not be dispatched before the last while loop ended. That's to say after URLLoader.load( URLRequest ), the loader will not sent data away immediately( no delay )? Cause a number of loader.load(request) commands need to be executed continuely and in order, I need to send data away without delay for each load command in order. How to solve it?
Thanks.