The function name will be in the stack trace. You'll probably want to write some code that parses it out. Probably something like:
Var s:String = error.getStackTrace(); Var arr:Array = s.split('\n"); s = arr[0]; // or maybe it is 1 ... ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ilikeflex Sent: Saturday, September 15, 2007 2:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Identify Function Name Hi Alex Thanks for the reply. If you could just tell me how to get the function name that will solve my problem. function A() { trace("function execute" + functionName); } If i execute the function it should print "function execute A" Thanks Rajan --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Using a debugger player and debug swf (so it won't work in production > mode), you can create an Error() instance and parse getStackTrace() > > > > function A() > { > log.debug("function execute" + new Error().getStackTrace()); > } > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of ilikeflex > Sent: Friday, September 14, 2007 4:16 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Identify Function Name > > > > Hi Team > > I am doing the logging of the application and now i want to know the > name of the function which is being executed. > In the below i want the functionName to be "A". > > function A() > { > log.debug("function execute" + functionName); > } > > Can we do it in flex??? > > Thanks > ilikeflex >