+3  A: 

"Unlike previous versions of ActionScript, ActionScript 3.0 has no arguments.caller property. To get a reference to the function that called the current function, you must pass a reference to that function as an argument."

From http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html

That's the only way you can do that, otherwise you'll need to make a global variable to tell what function is calling C

M28
So, this can't be done?
unkiwii
If you don't want to change C signature, only with a global var.
M28
A: 

Sure it can be done. You can do something like

private function C():void
{
  var e:Error = new Error();
  var stack:String = e.getStackTrace();
  //analyze stack and find out which function called it.
}

this is ugly but it would work.

SP
Yes, I know this, but read Note: "I like to have an instance of the caller function" and using the stack I only have the name of the function. Not the object or the function object
unkiwii
you might be able to get that once you have the name. look here:http://www.actionscript.org/forums/showthread.php3?t=197943
SP
Still the same, that way I can acces the method name, but what if that function is public and is called by other object? How can I call the function over the object who call me? To do that I need the function instance or the object (owner of the function) instance and the function name.
unkiwii
Beware this will only work with a debug versin of the player
Patrick