# TypeError: Error #1009, Simple code, SO FRUSTRATING!

**URL:** <https://forum.kirupa.com/t/typeerror-error-1009-simple-code-so-frustrating/305630>\
**Category:** flash\
**Created:** [March 1, 2010, 2:44am UTC](https://forum.kirupa.com/t/typeerror-error-1009-simple-code-so-frustrating/305630 "2010-03-01T02:44:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![facehouse](https://avatars.discourse-cdn.com/v4/letter/f/c77e96/32.png) [@facehouse](https://forum.kirupa.com/u/facehouse)\
**Post date:** [March 1, 2010, 2:44am UTC](https://forum.kirupa.com/t/typeerror-error-1009-simple-code-so-frustrating/305630/1 "2010-03-01T02:44:31Z")

</div>

I keep getting this error in my output window.

```auto
TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at fractionFishCS4_fla::MainTimeline/frame4()

```

I started working on this project in cs3 and switched to cs4 if it makes a difference

Heres my code…

```auto
var diffArray:Array = new Array();

var dificultyFish:difFish;
diffArray = new Array();

	for(var i:int = 1; i < 4; i++)
	{
		dificultyFish = new difFish();
		addChild(dificultyFish);
		
		dificultyFish.gotoAndPlay(i*10);
		
		with (dificultyFish)
		{
			x = 600;
			y = i * 60 + 40;			
			fishColor = colorChanger(i);
			
			with (difNum)
			{
				difLevel = i;
			}
			fishValue = difLevel;
		}
		
	
	diffArray.push(dificultyFish);	
	}

stop();

```

somebody please help… i’ve been trying for days and my brain is fried.
