[Flashcoders] Getting the class name?

2006-05-25 Thread David Skoglund
Hi, I' trying to get the class name of a class in order to serialize a scene. Since I donĀ“'t have a traditional programming background I have a hard time searching for this since I really don't know the vocabulary. In this code I'd like the trace function to output "MyClass": class MyClass exte

RE: [Flashcoders] Getting the class name?

2006-05-25 Thread Merrill, Jason
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 ___

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread David Skoglund
). /David - Original Message - From: "Merrill, Jason" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, May 25, 2006 2:56 PM Subject: RE: [Flashcoders] Getting the class name? Given: class MyClass extends MovieClip { function MyClass (){

RE: [Flashcoders] Getting the class name?

2006-05-25 Thread Merrill, Jason
gt;[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,

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread eka
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 PROTECT

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread mike cann
me 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 Sk

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread Arul Prasad
> > > > > > > > > > > > > > > > > > >>-Original Message- > > >>From: [EMAIL PROTECTED] > > >>[mailto:[EMAIL PROTECTED] On Behalf > > >>Of David Skoglund > > >>Sent: Thursday, May 25, 2006 9

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread mike cann
e) > > > trace(b.type) > > > > > > Name usually refers to the instance name. > > > > > > Jason Merrill > > > Bank of America > > > Learning Technology Solutions > > > > > > > > > > > > > > > &g

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread Arul Prasad
> > > var b:MyClass = new MyOtherClass(); > > > > trace(a.type) > > > > trace(b.type) > > > > > > > > Name usually refers to the instance name. > > > > > > > > Jason Merrill > > > > Bank of America >

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread eka
> > > class MyOtherClass extends MovieClip{ > > > > public var type:String = "MyOtherClass" > > > > } > > > > > > > > In Flash: > > > > > > > > var a:MyClass = new MyClass(); > > > > var b:MyCla

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread eka
; > > > > > class MyOtherClass extends MovieClip{ > > > > > public var type:String = "MyOtherClass" > > > > > } > > > > > > > > > > In Flash: > > > > > > > > > > var a:MyClass =

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread mike cann
> > > > > > > > > > > > class MyClass extends MovieClip{ > > > > > > public var type:String = "MyClass" > > > > > > } > > > > > > > > > > > > class MyOtherClass extends Movie

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread Ian Thomas
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 :) _

Re: [Flashcoders] Getting the class name?

2006-05-25 Thread eka
better yes :) search in AS3 reference : http://livedocs.macromedia.com/labs/1/flex20beta3/langref/index.html in package flash.utils, the methods : getQualifiedClassName(o) , getQualifiedSuperclassName and describeType(o):XML describeType method returns a XML object ... I'm not a XML's FAN... b

Re: [Flashcoders] Getting the class name?

2006-05-26 Thread David Skoglund
ay 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

Re: [Flashcoders] Getting the class name?

2006-05-26 Thread John Grden
but ekas system seems interesting for future projects. /David - Original Message - From: "Ian Thomas" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, May 25, 2006 9:50 PM Subject: Re: [Flashcoders] Getting the class name? Having googled to find you

Re: [Flashcoders] Getting the class name?

2006-05-26 Thread John Grden
e property for this > project, but ekas system seems interesting for future projects. > > /David > > - Original Message - > From: "Ian Thomas" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" < flashcoders@chattyfig.figleaf.com> > Sent: Th