Hi Micky, Colin Moock (in EAS3) explicitly advises agains the redundant use of 'this' to avoid visual clutter. When you work in the Flash IDE though (sorry Jason) it has the advantage that all variables and methods of 'this' are available in the code hinting contextual menu. So I think it's really up to your own preference. HTH Willem van den Goorbergh
On 8 jun 2011, at 06:55, Micky Hulse wrote: > Hi, > > Stupid question, but... > > Let's say I have some class properties: > > private var _mc1:MovieClip; > private var _mc2:MovieClip; > > ... and methods: > > private function baz():void { ... } > private function foo():void { ... } > > In my code, would it be overkill to always reference the above > examples with a prefix of "this"? > > For example: > > this._mc1 = ...; > this._mc2 = this.mc1; > this.baz(); > this.foo(); > > I could easily do this instead: > > _mc1 = ...; > _mc2 = mc1; > baz(); > foo(); > > Sorry if silly question, I am just kinda wondering what the pros do. :) > > Best practices? > > Thanks! > Micky > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Geografiek is a Dutch, Utrecht-based map and chart design company. Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell phone: (+31)6-26372378 or by fax: (+31)302719687 snail mail: Hooghiemstraplein 89 3514 AX UTRECHT Visit our website at: www.geografiek.nl twitter: @wvdgoorbergh =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders