Alright, I've inherited someone else's code and everything seems to be working pretty good, but, sometimes (and it's not consistent), the pages that are loaded into the shell seem to "fail" while loading. On a faster connection, I have no problems. On a slow connection, the page will start loading, go up to a certain percent (different for different pages) and then stop. If I refresh the shell and go back to that page, it will stop at the same loading amount. If I re-upload the swf file to the server, it usually fixes itself. If I try to access that page from another machine, it doesn't freeze at the same point and, often, doesn't freeze at all. Can't consistently reproduce it or fix it, but it's making me crazy so, was wondering if anyone sees anything in the loading code that might cause that? Here it is:

Code:
var loader:Loader = new Loader();
var pcent:Number;

function loadLesson(slide:int){
	CurrentSlide = slide;
	unloadSwf();
	loader.load(new URLRequest(Slides[CurrentSlide]));
	loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);	loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadComplete);	
}

function loadProgress(e:Event){
	loading.visible = true;
	pcent = (loader.contentLoaderInfo.bytesLoaded / loader.contentLoaderInfo.bytesTotal)*100;
	loading.bar.scaleX = (loader.contentLoaderInfo.bytesLoaded / loader.contentLoaderInfo.bytesTotal);
	if(Math.ceil(pcent)>1){
		loading.perc.text = Math.ceil(pcent).toString() + "%";
	}
}