How can I access my Text Field from Flash with ActionScript in Flash Builder 3.0?
I have a Movie Clip in Flash that contains two text fields with the instance names: "petName and description"
I've got a superclass, "Animal", with three subclasses: Piggy, Goat, and Puppy.
I've tried doing this: (where "buddy" is and 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".
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". (There is also _petName, which is a different variable in my code that I'm using to actually store the name, "Buddy," etc.)
The "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.
*Note: I ended up changing in flash the instance names from "petName and description" to "myName and myText" to be a little bit easier to distinguish. But even if I do:
buddy.myText.text = "Hello world.";
... I don't see the option for "myText" available in the autocomplete when I'm writing my coe.
Thank you for your help!
-Liz
Can no one seriously help on the Adobe forums? If no one can help, can someone please point me to a paid professional who'd be willing to help me figure out my problem?
