I get a vague "Socket timeout." error on occasion when I am loading my site. I make various HTTP requests for PHP data and also am using a Loader() class instance. Can anyone shed some light on where this error might be coming from?
I wish there was more of an indication of where the error stemmed from...
Here is my code that I am using. There are multiple problems going on, but the most important is that catch{} catches an error on first load. I have a fade in function that only works if the loader is fully loaded and I know that all of my URL links work, so it can't be that.
public function loadImage(url:String):void { this._imageURL = url; this.alpha = 1.0; //need this because we might have just faded the image out
_ldr.alpha = 0.0; _prog.alpha = 1.0; _sqr.alpha = 0.0;
try { _ldr.close(); _ldr.unload(); } catch(e:Error) { trace("error in bmdisplay: " + e.message); }
if(!_imageURL) { return; }
_loaded = false; _ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress); _ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); _ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError); _ldr.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError); _ldr.load(new URLRequest(_imageURL)); }