im not entirely sure but can you use "instanceof" against a switch statement to check if its of a particular class?
On 25/05/06, eka <[EMAIL PROTECTED]> wrote:
Hello :) you can use my ContructorUtil class with the statics getName, getPackage and getPath methods : http://live.burrrn.com/browser/projects/VEGAS/AS2/trunk/src/vegas/util/ConstructorUtil.as More precision in http://osflash.org/vegas to install VEGAS with SVN :) you can read in french my TRAC : http://live.burrrn.com/wiki/VEGAS now for the custom object's serialization you can use EDEN : http://live.burrrn.com/wiki/eden EKA+ :) 2006/5/25, Merrill, Jason <[EMAIL PROTECTED]>: > > 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 > _______________________________________________ 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