You mean the Class type then - for a custom class, I think you would have to create a property to hold that.
class MyClass extends MovieClip{ public var type:String = "MyClass" } class MyOtherClass extends MovieClip{ public var type:String = "MyOtherClass" } In Flash: var a:MyClass = new MyClass(); var b:MyClass = new MyOtherClass(); trace(a.type) trace(b.type) Name usually refers to the instance name. Jason Merrill Bank of America Learning Technology Solutions >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of David Skoglund >>Sent: Thursday, May 25, 2006 9:17 AM >>To: Flashcoders mailing list >>Subject: Re: [Flashcoders] Getting the class name? >> >>Yes, i know that the class name is MyClass when writing the >>code, but does the object know what class it is constucted >>from at runtime? >> >>I want to save out scene objects to a XML-file and need to >>save what class the objects are constructed from (or their >>linkage ID in set in the Flash IDE). >> >>/David >> >> >>----- Original Message ----- >>From: "Merrill, Jason" <[EMAIL PROTECTED]> >>To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> >>Sent: Thursday, May 25, 2006 2:56 PM >>Subject: RE: [Flashcoders] Getting the class name? >> >> >>> Given: >>> >>>>>class MyClass extends MovieClip { >>>>> >>>>> function MyClass (){ >>>>> trace (this.className) >>>>> } >>> >>> The name of the class is "MyClass" - or do you mean the >>instance name? >>> >>> Jason Merrill >>> Bank of America >>> Learning Technology Solutions >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >> >>_______________________________________________ >>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 >> _______________________________________________ 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