Check out http://dynamicflash.com/2005/03/class-finder/

Mh23 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manuel
Saint-Victor
Sent: Friday, April 07, 2006 11:45 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS2: Get Instance Name of Class?

You might try creating a _name property and passing each instance its name
as a param of the constructor.
then you can retrieve that name.  I tried some other ways and got the
dreaded [Object object] trace

Mani

On 4/7/06, Rifled Cloaca <[EMAIL PROTECTED]> wrote:
>
> All,
>
> Is there a way to get the instance name of a class from within the 
> class?  I need to refer to a variable by its absolute targetPath, but 
> the instance name of the class is not known until runtime.
>
> class Foo {
>
>   var results:String;
>   var resultVar:String;
>
>   function foo () {
>     this.resultVar = "_level0." + instanceName? + ".results";
>   }
>
> }
>
> // example
> myFoo = new Foo();
>
> myFoo[resultVar] = "Bar";
>
> How can I get instanceName? Thanks!
>
> -Geoff
> _______________________________________________
> [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