# TypeError: Error #1009: Cannot access a property or method of a null object reference

**URL:** <https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/328888>\
**Category:** Uncategorized\
**Created:** [June 28, 2012, 11:35am UTC](https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/328888 "2012-06-28T11:35:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeponkz](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jeponkz](https://forum.kirupa.com/u/jeponkz)\
**Post date:** [June 28, 2012, 11:35am UTC](https://forum.kirupa.com/t/typeerror-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/328888/1 "2012-06-28T11:35:04Z")

</div>

THis is weird!! I dont know what happen!

I try to load an external swf using Loader.

this is my code

```auto
package {
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.net.URLRequest;
	
	/**
	 * ...
	 * @author 4 loop
	 */
	public class Main extends MovieClip 
	{
		public function Main():void 
		{
			var myLoader:Loader = new Loader();
			myLoader.load(new URLRequest("DigitalMap.swf"));
			stage.addChild(myLoader);
		}
	}
	
}

```

and I got an error

but when I change myLoader.load(new URLRequest(“DigitalMap.swf”)); into myLoader.load(new URLRequest(“a.swf”)); its ok…

They are all in the same location!

see this… whats going on guys?? I cant figure it out!

Help me guys! I am making preloader that loads another swf file…
