I simply create a movie clip, put it on the stage and give it an instance name of char.
Here's my document class, simple as can be:
public class Test extends MovieClip
{
public function Test()
{
char.x = 1315; char.y = 459;
addEventListener(Event.ENTER_FRAME, mouseListen);
}
private function mouseListen(e:Event) {
char.x = mouseX;
char.y = mouseY;
}
}
And I get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.me::Test/::mouseListen()
How in the world is it possible that it knows what "char" is in the constructor but not in the mouseListen function? What else could it be?