# Flash can't access class after loading an external swf

**URL:** https://forum.kirupa.com/t/flash-cant-access-class-after-loading-an-external-swf/271382
**Category:** Uncategorized
**Created:** [September 22, 2008, 3:06pm UTC](https://forum.kirupa.com/t/flash-cant-access-class-after-loading-an-external-swf/271382 "2008-09-22T15:06:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spooks222](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@spooks222](https://forum.kirupa.com/u/spooks222)
#### Post date: [September 22, 2008, 3:06pm UTC](https://forum.kirupa.com/t/flash-cant-access-class-after-loading-an-external-swf/271382/1 "2008-09-22T15:06:04Z")

</div>

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Drawing/::init()

From my main menu when you click the contact button, it loads contact.swf

```auto
function downContact(MouseEvent):void{
	var request:Loader = new Loader();
request.load(new URLRequest ("Contact.swf"));
loadMC.addChild(request)
}

```

contact.swf has a class attached to it called Drawing.as, and for some reason flash can’t access it(works fine by itself)

do I have to also load the actionscript file? thanks! (i have a couple more questions after i get this part fixed)
