Please help me get this preloader working!


I have a preloader which has this code (simplified):

var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
loader.load(new URLRequest("x.swf"))

function loaded(e:Event):void

And x.swf has this code (very simplified):


When I run preloader, I get this error:
[FONT=Courier New]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at x_fla::MainTimeline/frame1()