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
package com.daze{
public class person {
public function person() {
}
public function location():uint {
trace(this.name);
return (3);
}
}
}
teacher
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.