If I understand you requirements, you are trying to work out where the
data was passed to the function... your best bet is to use
arguments.callee to work this out.

Lee



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Mark Hawley
Sent: 30 May 2006 14:10
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Get Original Variable's Name in Function?

Why would you need to know the variable name? It sounds like something 
has gone heinously wrong with your code if this need is popping up.

Doug Coning wrote:
> Greetings all,
>
> Is it possible to retrieve the name of the variable passed into a
> function?  For instance:
>
> function myFunct(str:String){
>       // GET ORIGINAL NAME of str?
> }
>
> var foo:String = "ABC";
> var moo:String = "DEF";
> myFunct(foo);
> myFunct(moo);
>
> In the above, how can myFunct know that the first call was sent 'foo'
> and the second call was sent 'moo'?
>
> Thanks,
>
> Doug Coning 
> Senior Web Development Programmer
> FORUM Solutions, LLC
>  
> This e-mail and any attachment(s) are intended for the specified
recipient(s) only and are legally protected.  If you have received this
communication in error, please "reply to" sender's e-mail address with
notification of the error and then destroy this message in all
electronic and physical forms.
> _______________________________________________
> [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
_______________________________________________
[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