Skip to main content
km79
Participating Frequently
October 29, 2010
Question

Set or even get the timeout for URLRequest objects

  • October 29, 2010
  • 2 replies
  • 1457 views

Hi,

I try to set the timeout for my URLRequest via

Code:
var tempURLRequest:URLRequest = new URLRequest (path);
tempURLRequest.idleTimeout = 2000;

But it doesn't work. Thus: How can I set/change/get the timeout  for URLRequests? I need this since I start many parallel URLRequests and  on slow connections I get an IOError URL not found error due to the  long time they are on stack (I asume).

Thanks

Konrad

This topic has been closed for replies.

2 replies

October 29, 2010

How do you load your URLRequest?

Can you show that part? with a loop?

km79
km79Author
Participating Frequently
October 29, 2010

The code to load a single image is:

var imageLoader:Loader = new Loader ();

imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, loadHandler);           

var tempURLRequest:URLRequest = new URLRequest (path);

tempURLRequest.idleTimeout = 2000;

imageLoader.load (tempURLRequest);

And this function is called multiple (~500-3000) times in a "for" loop.

On fast connections all URLRequest are processed without any errors. On slow connections the later URLRequest get the "URL not found" error that I attribute to a timeout of the reqeusts.

October 29, 2010

idleTimeout  property is just for AIR 2 I think.