I've currently got an XHTML/JavaScript AIR application. I'm
using the air.URLRequest method to request files available on a web
server. After checking to make sure that Internet access is
available I create a new URLRequest variable (see below) and attach
to it a number of event listeners.
What seems to be happening is that things will run fine most
of the time. However, occasionally, for whatever reason, a file
will 'hang' during download and events are never fired.
I'd like to try and avoid hard coding a javascript timeout
value to force the issue. However, if none of the following events
are never fired my app never proceeds to grab the next in the
series. The user has to close the application and reopen. Is there
a better way to handle uncompleted download requests?
quote:
var urlReq = new air.URLRequest(urlString);
myProcess.addEventListener(air.Event.COMPLETE,
imageOnComplete);
myProcess.addEventListener(air.IOErrorEvent.IO_ERROR,
imageIOErrorHandler);
myProcess.addEventListener(air.SecurityErrorEvent.SECURITY_ERROR,
imageSecurityErrorHandler);
myProcess.load(urlReq);