What can be the way to know the class name "Abc" from where the function of a reference variable "def" has been called ? Except these two ways :
1) Adding the def as a child of Abc
2) Injecting reference of Abc into Def prior or during the function call.
here is the class Abc :
public class Abc
{
var def:Def ;
public function Abc()
{
def = new Def();
def.myfun() ;
}
}
public class Def
{
public function Def()
{
}
public function myfun():void
{
// Code to know, this function has been called from class named Abc ;
}
}