Yes and this also applies to AS2. All depending on how you want your function to work. The usage of variables declared outside a anonymous class or function is possible but it's important to know in which scope those variables are being accessed, thus the usage of "this" can be very useful to know exactly what you are accessing.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zwetan Sent: October 29, 2005 9:03 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Re: Newbie AS3 question > >>No need to get hyper about "this". > >>The matter stays that "this" used to be essential in AS1, thus probably > why > >>people still like to implicate him in their code. But I agree that > putting > >>"this" in an AS2 Class should be used only when necessary. > > > > You do know that it (this.) is being added for you at compile time in > AS2, right? > > Who cares? All that means is that there is no semantic difference > between the two. There is a difference for AS3 ! (and this is the correct behaviour) http://livedocs.macromedia.com/labs/1/flex/langref/statements.html#this "To call a function defined in a dynamic class, you must use this to invoke the function in the proper scope" zwetan _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders