# Please help me get this preloader working!

**URL:** https://forum.kirupa.com/t/please-help-me-get-this-preloader-working/290847
**Category:** flash
**Created:** [June 20, 2009, 9:18pm UTC](https://forum.kirupa.com/t/please-help-me-get-this-preloader-working/290847 "2009-06-20T21:18:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![OmerHassan](https://avatars.discourse-cdn.com/v4/letter/o/59ef9b/32.png) [@OmerHassan](https://forum.kirupa.com/u/OmerHassan)
#### Post date: [June 20, 2009, 9:18pm UTC](https://forum.kirupa.com/t/please-help-me-get-this-preloader-working/290847/1 "2009-06-20T21:18:10Z")

</div>

Hi,

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

```auto
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):

```auto
trace(stage.stageWidth);

```

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()

[FONT=Verdana]Tanks!!![/FONT]  
[/FONT]
