Unless.... You are passing a function into a newly created object and need to explicityle refer to the object that it is passed into.
..inside class var myFunction:Function = new Function(){ this.a = 2; this.b = 5; this.c = this.a + this.b; } var newObj = new Object(); newObj.onLoad = myFunction; ..class continues Then you have to use "this". Just sayin'. HTH Alias On 07/11/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> I know I don't have to. > But I think the code is more clear that way. Classes will not compile if you try to access variables that are not declared in the class. So by accessing a variable, it is inherently referring to "this" because it absolutely must be, thus that particular use of "this" is redundant and a remnant of the days of AS1 classes (prototype) and maintaining scope within them. That's not to say "this" doesn't have its place, but since its place is more refined now, I find it's more important to reserve its use for those times so it stands out that much more. However, everyone has their own style and if using "this" gives you warm fuzzies, then who am I or anyone to take that away from you? :) _______________________________________________ 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