and one more ;)  Xray's ClassPath does a good job with reflection:

http://mirror1.cvsdude.com/trac/osflash/xray/browser/DEV_Source/xray/classes/com/blitzagency/xray/ClassPath.as

here's a sample:
   import com.blitzagency.xray.ClassPath;
   ...
   //  first, initialize when app starts
   addPackages(["com","org", "net"]);

   public static function addPackages(ary:Array):Void
   {
       // init classpaths added via the PI:
       for(var i:Number=0;i<ary.length;i++)
       {
           if(ary[i] != "") ClassPath.registerPackage(ary[i]);
       }
       // add intrinsic classes
       ClassPath.registerPackage();
       packagesInitialized = true;
   }

   // then, later, when you want the class name
   var shortName:String = ClassPath.getClass(object, false);

   var fullPathAndName:String = ClassPath.getClass(object, true);

hope that helps,

JG

On 5/26/06, David Skoglund <[EMAIL PROTECTED]> wrote:

Thanks everyone responding. I'll create a class type property for this
project, but ekas system seems interesting for future projects.

/David

----- Original Message -----
From: "Ian Thomas" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Thursday, May 25, 2006 9:50 PM
Subject: Re: [Flashcoders] Getting the class name?


Having googled to find your code - that's a really nice way of doing
it. Well done!

(Does anyone know if AS3 has a better reflection system than AS2..?)

Ian

On 5/25/06, eka <[EMAIL PROTECTED]> wrote:
> Hello :)
>
> i think it's more easy to use my class :)
_______________________________________________
[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




--
John Grden - Blitz
_______________________________________________
[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