# 1009 sucks SO much

**URL:** <https://forum.kirupa.com/t/1009-sucks-so-much/313202>\
**Category:** Uncategorized\
**Created:** [August 23, 2010, 8:06pm UTC](https://forum.kirupa.com/t/1009-sucks-so-much/313202 "2010-08-23T20:06:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hedgehogrider](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hedgehogrider](https://forum.kirupa.com/u/hedgehogrider)\
**Post date:** [August 23, 2010, 8:06pm UTC](https://forum.kirupa.com/t/1009-sucks-so-much/313202/1 "2010-08-23T20:06:43Z")

</div>

Alright, so I’m getting a #1009 TypeError (everyone’s favorite, right?) and I’m having a lot of trouble finding the source of the problem. The code I have posted is one part of an OOP. I’m pretty sure that the Level Class is unable to instantiate the playercontainer variable. What you need to know here is that PowerlessContainer extends PlayerContainer. I can upload other Classes if requested, wasn’t sure where the real problem lies ☹

Here’s the Level Class

```auto

package  
{
	import flash.display.MovieClip; 
	public class Level extends MovieClip
	{
		public static var playercontainer:PlayerContainer = new PowerlessContainer;
		public function Level() 
		{
			addChild(playercontainer);
		}

	}
	
}

```

and here’s the full error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Player/directBehavior()  
at PlayerContainer/doFrame()
