I’m currently learning OOP through Sen’s information here at Kirupa, and I’ve decided to try out his “creatures” exercise mentioned in his Best of Senocular thread…I still have a bunch to learn, but I wanted to go ahead and ask a question for a problem I am having right now.
The situation is a random number of sprites are created, and they move around the stage, interacting. They all have a certain amount of “health,” defined as a variable in a MovieClip prototype applied to the MC. When they hit, I want their health to go down a little bit, so how can I access a particular MC’s “health” variable while I’m outside of the MC itself?