ForumsProgramming ForumAccessing the "Parent Class"

12 3790
IQAndreas
offline
IQAndreas
299 posts
Peasant

I am not talking about the parent in the Display Object Hierarchy (the parent that can be accessed when you write class1.addChild(class2); .

For example, how would class2 here access class1? Or access class1.property1?

public class class1
{

private var class2:class2object = new class2object()

function property1():String
{
return "From property1";
}

}


I want class2 to be able to call property1. Is there any way for it to know its &quotarent"?

I have a bit of a time constraint here, so any help ASAP would really be appreciated.

  • 12 Replies
Showing 16-15 of 12