So basically, I have an Object in Flash that contains two text fields: "petName" and "description"
I've got a superclass, "Animal", with three subclasses: Piggy, Goat, and Puppy.
I've tried doing: (where "buddy" is an instance of "Puppy")
buddy.description.text = "Hello world.";
But I keep getting the error, "Access of undefined property petName through a reference with static type "puppy".
Can anyone help?
Thanks, -Liz :)
Here's my code:
----> Animal Class: http://pastebin.com/cTve8spB
----> Puppy Sub-Class: http://pastebin.com/VcPNDkAi
----> Main File: http://pastebin.com/nTsPM7ve
Basically, I have a text bubble, that has two text fields inside of it. One is the name, the other is the description. The name is "petName" and the description is "description"
Animal class extends BubbleBase (the base graphic for my speech bubble), and the Puppy class extends Animal... so I'm not sure why I'm not able to access the text fields. Thank you for your help!