# Error 1119: Access of possibly undefined property

**URL:** https://forum.kirupa.com/t/error-1119-access-of-possibly-undefined-property/305862
**Category:** Uncategorized
**Created:** [March 4, 2010, 5:50pm UTC](https://forum.kirupa.com/t/error-1119-access-of-possibly-undefined-property/305862 "2010-03-04T17:50:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Lees](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@David\_Lees](https://forum.kirupa.com/u/David_Lees)
#### Post date: [March 4, 2010, 5:50pm UTC](https://forum.kirupa.com/t/error-1119-access-of-possibly-undefined-property/305862/1 "2010-03-04T17:50:27Z")

</div>

Hi. I hope someone can help with this. I am new to Actionscript 3 and OOP in general so it may be something really simple. I am getting the following error when I try to compile my program.

1119: Access of possibly undefined property name through a reference with static type com.daze:person.

I have these two classes…

person

```auto
package com.daze{
	public class person {
		public function person() {
		}

		public function location():uint {
			trace(this.name);
			return (3);
		}
	}
}

```

teacher

```auto
package com.daze{
	import com.daze.person;
	public class teacher extends person {
		public function teacher(myName:String="Mr. Anonymous"
		) {
			name=myName;
		}

		public var name:String;
	}
}

```

The error is caused when I do trace(this.name) in the person class. I want it to display the teacher.name property. How can I access varibles from the teacher class in the person class?

Thanks in advance for any help.
