1 Reply Latest reply on Apr 4, 2007 7:40 AM by kglad

    "this." inside as2 classes

    Level 7
      Can any one say, if i should use "this." inside my classes to refer class
      variables and methods? What is its advantage and disadvantage? Does this
      help compiler/flash player in any way.

      please provide some useful links which explain more.



        • 1. Re: "this." inside as2 classes
          kglad Adobe Community Professional & MVP
          when it's appropriate you can use "this". so, if you've just created a movieclip and you're defining a mouse handler for it, it's appropriate to use this within the handler's scope.

          but to refer to a class member, i use a private variable in the constructor function to use throughout the class so i don't have scope issues outside the constructor function.