This isn't possible, because local vars typically (that is, in
function2 which is used for class methods) become registers in the
bytecode, i.e., the name you give a local var won't be included in
your SWF *at all*, they are physically missing in the compiled SWF.
The old function tag used named variables (getVariable, setVariable),
but those string identifiers aren't accessible, either.

You can have a look yourself, simply name a var something you don't
use for a property anywhere (say, "asdasd") and search it in the
output of flasm or swfmill. It won't be there. As a simpler test, use
a longer name and observe the file size not getting any bigger.

Hth,
Mark



On 5/30/06, Doug Coning <[EMAIL PROTECTED]> 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.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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



--
http://snafoo.org/

key: 1BD689C0 (3801 6F51 4810 C674 1491 ADE7 D8F6 0203 1BD6 89C0)
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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