PDA

View Full Version : OOP how do i get 2 classes to communicate?


taonuts
06-19-2008, 06:56 AM
I have 3 separate classes. a main class and 2 objects. How do i get 1 class to refer to a specific instance of another class?
for example.
i want my Map class to reference a specific instance of the Player class. the instance is named firstPlayer. how would the Map class affect firstPlayer?

i know that we use this.whatever to reference the class at hand but how do you reference other classes?

thank you.

DiamondDog
06-19-2008, 10:46 AM
A similar question turned up yesterday.

If this (http://www.actionscript.org/forums/showthread.php3?t=174446) doesn't answer your question, let us know.