Here's one way in AS2:

import mx.utils.Delegate

var oRel:Object = myButton_mc.onRelease = Delegate.create(this,
myButtonOnRelease)
var oRol:Object = myButton_mc.onRollOver = Delegate.create(this,
myButtonOnRelease)
oRel.name = "onRelease"
oRol.name = "onRollOver"

function myButtonOnRelease():Void
{
        trace(arguments.caller.name)
}

Jason Merrill
Bank of America  
GT&O Learning & Leadership Development
eTools & Multimedia Team


 

>>-----Original Message-----
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf 
>>Of Mendelsohn, Michael
>>Sent: Monday, July 16, 2007 1:05 PM
>>To: [email protected]
>>Subject: [Flashcoders] Arguments.callee._name?
>>
>>Hi list...
>>
>>Is it possible somewhere to get the name of the function 
>>being called, i.e. return "onPress" or "onRelease"?
>>
>>- MM
>>_______________________________________________
>>[email protected]
>>To change your subscription options or search the archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Adobe Consulting and Training 
>>http://www.figleaf.com http://training.figleaf.com
>>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to