I used the code below to make a preloader and it works fine when I try it locally, but gives me the following error when I try to use it in a website: "Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found." The preloader is a swf that pulls in another swf after it loads. Also when I use the swf that the preloader is pulling in, it also works. Any suggestions?


Code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("myswf.swf"));

function loop(e:ProgressEvent):void {
	var perc:Number = e.bytesLoaded / e.bytesTotal;
	percent.text = Math.ceil(perc*100).toString();
}

function done(e:Event):void {
	removeChildAt(0);
	percent = null;
	addChild(l);
}